[vtkusers] How to draw an ellipse?

Jose David Pfuturi Huisa daviddarkzero at hotmail.com
Sat Jun 7 23:26:52 EDT 2008


Hello Rashed, you can draw it manually using vtkPoints and vtkPolyLine to define an ellipse according to ellipse equation.
i did it as follows in python:
 
while self.i<=(2*pi):            self.polyLinePoints.InsertPoint(self.cont, self.a*cos(self.i)+ 0,self.b*sin(self.i)+ 0, 0)            self.i=self.i+(pi/15)            self.cont=self.cont+1Next:
self.aPolyLine = vtkPolyLine()self.aPolyLine.GetPointIds().SetNumberOfIds(self.cont+1)for self.j in range(self.cont):            self.aPolyLine.GetPointIds().SetId(self.j, self.j)
 
Although, you can also modify the circle. I didnt never try to do it.
> Date: Sat, 7 Jun 2008 16:29:29 -0700> From: rashed.vtk at googlemail.com> To: vtkusers at vtk.org> Subject: [vtkusers] How to draw an ellipse?> > > Hi all, > > How do I draw a 2D ellipse on the screen? Is there a VTK function which does> this? I know for a circle you can use a vtkRegularPolygonSource. > > Thanks> Rashed> -- > View this message in context: http://www.nabble.com/How-to-draw-an-ellipse--tp17714285p17714285.html> Sent from the VTK - Users mailing list archive at Nabble.com.> > _______________________________________________> This is the private VTK discussion list.> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ> Follow this link to subscribe/unsubscribe:> http://www.vtk.org/mailman/listinfo/vtkusers
_________________________________________________________________
Tecnología, moda, motor, viajes,…suscríbete a nuestros boletines para estar siempre a la última
Guapos y guapas, clips musicales y estrenos de cine. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080608/5efc2969/attachment.htm>


More information about the vtkusers mailing list