[vtkusers] Re: circle

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Aug 17 10:36:38 EDT 2005


Goodwin Lawlor wrote:
> Hi Isabelle,
> 
>> I would like to draw a circle each time and where exactly the user 
>> clicks on my displayed image.
>>  
>> I saw examples to draw a sphere:
>>  
>>  *vtkSphereSource* m_sphere = vtkSphereSource::New();
>>  vtkActor*  m_sphereActor = vtkActor::New();
>>  vtkPolyDataMapper* sphereMapper = vtkPolyDataMapper::New();
>>  sphereMapper->SetInput(m_sphere->GetOutput());
>>  m_sphereActor->SetMapper(sphereMapper);
>>  m_Renderer->AddActor( m_sphereActor );
>> * But is there a way to draw a circle (that is *empty disk* and in 
>> *2D*) instead of a filled sphere in 3D?
> 
> 
> Have a look at the vtkRegularPolygonSource class- I'm not sure which 
> version of VTK it appeared in though.

How about :
http://www.vtk.org/doc/nightly/html/classvtkDiskSource.html

Where you'll set inner and outter radius to be very close ?

HTH
Mathieu



More information about the vtkusers mailing list