[vtkusers] draw an ellipsoid

David Doria daviddoria at gmail.com
Mon Sep 12 10:30:39 EDT 2011


On Mon, Sep 12, 2011 at 10:31 AM, Henrik Westerberg
<Henrik.Westerberg at crg.eu> wrote:
> Hi Folks,
>
> If you have trouble adding source files to VTK you can always use a vtkSphereSource as I wanted
> this functionality for representing growth tensors but without using the vtkTensorGlyph.
>
> sphere = vtkSphereSource();
> sphere.SetRadius(100);
> sphere.SetThetaResolution(10);
> sphere.SetPhiResolution(10);
>
> Then you can rescale it in x,y,z, reorientate, and translate it with vtkTransform.
>
> bye,
> Henrik

Yep, that's exactly what vtkEllipsoidSource does :). You don't have to
add it to VTK - you can just compile it along with your project.

David



More information about the vtkusers mailing list