[vtkusers] ELLIPSE
    Patric.Weis at mycrona.de 
    Patric.Weis at mycrona.de
       
    Wed Sep 13 03:54:33 EDT 2000
    
    
  
Hi Antonella,
you can use vtkQuadrics to evaluate and render an ellipsoid. The equation
of an ellipsoid is
     (x/a)^2 + (y/b)^2 +  (z/c)^2 = 1
so you only have to set the first 3 coefficents of the quadric equation.
An excellent side for further information can be found at
http://www.swin.edu.au/astronomy/pbourke/geometry.
Here's a tcl snippet which may help:
...
# Quadric definition
  vtkQuadric ellipse
    ellipse SetCoefficients 0.5 0.5 1 0 0 0 0 0 0 0
  vtkSampleFunction sample
    sample SetSampleDimensions 30 30 30
    sample SetImplicitFunction ellipse
# Create the surface F(x,y,z) = constant
  vtkContourFilter contour
    contour SetInput [sample GetOutput]
    contour SetValue 0 0.5
  vtkPolyDataMapper contMapper
    contMapper SetInput [contour GetOutput]
  vtkActor contActor
    contActor SetMapper contMapper
...
Ciao
Patric Weis
MYCRONA GmbH
- - - Original Message - - -
   Hi!
   Anybody could you tell me if there is a class that computes the implicit
   =
   function and function gradient for an ellipsoid as for sphere,cone etc?
   thanks in advance
   Antonella
    
    
More information about the vtkusers
mailing list