<div dir="ltr">Dear VTK list,<div><br></div><div>I want to create a 3D object that looks like an egg/ovoid. I tried to to this with vtkSphere and by setting the vtkTransform-&gt;Scale to something like 3,1,1 but it&#39;s not working. I would be very glad if you could help me on this. Please find below the code and thank you for any help!</div>
<div><br></div><div><div><br></div><div><div>vtkSphereSource *sSource= vtkSphereSource::New();</div><div>   sSource-&gt;SetThetaResolution( 12);</div><div>   sSource-&gt;SetPhiResolution (  12);</div><div>   sSource-&gt;SetCenter( 0, 0, 0 );</div>
<div>   sSource-&gt;SetRadius( 10.0 );</div></div><div><br></div><div><div>vtkTransform* transform = vtkTransform::New();</div><div>     transform-&gt;Identity();</div><div>   transform-&gt;Scale(3,1,1);</div><div>   transform-&gt;Update();</div>
<div>   vtkSphere* sphere = vtkSphere::New();</div><div>   sphere-&gt;SetCenter(0,0,0);</div><div><span style="white-space:pre">  </span>sphere-&gt;SetTransform(transform);</div></div><div><br></div><div>     vtkSmartPointer&lt;vtkClipPolyData&gt; clipper = vtkSmartPointer&lt;vtkClipPolyData&gt;::New();</div>
<div>    clipper-&gt;SetInputConnection(sSource-&gt;GetOutputPort());</div><div>    clipper-&gt;SetClipFunction(sphere);</div><div>    clipper-&gt;SetValue(0);</div><div>    clipper-&gt;Update();</div><div><br></div><div>
  vtkPolyDataMapper *map = vtkPolyDataMapper::New(); </div><div>  map-&gt;SetInput(clipper-&gt;GetOutput());</div><div><br></div><div>  vtkActor *aSphere = vtkActor::New(); </div><div>  aSphere-&gt;SetMapper(map); </div><div>
  aSphere-&gt;GetProperty()-&gt;SetColor(0,0,1); </div></div><div>......</div><div>.....</div><div>.....</div></div>