FreeMat

- Main Page
- Related Pages

vtkSuperquadricSource

Section: Visualization Toolkit Graphics Classes

# Usage

vtkSuperquadricSource creates a superquadric (represented by polygons) of specified size centered at the origin. The resolution (polygonal discretization) in both the latitude (phi) and longitude (theta) directions can be specified. Roundness parameters (PhiRoundness and ThetaRoundness) control the shape of the superquadric. The Toroidal boolean controls whether a toroidal superquadric is produced. If so, the Thickness parameter controls the thickness of the toroid: 0 is the thinnest allowable toroid, and 1 has a minimum sized hole. The Scale parameters allow the superquadric to be scaled in x, y, and z (normal vectors are correctly generated in any case). The Size parameter controls size of the superquadric.

This code is based on "Rigid physically based superquadrics", A. H. Barr, in "Graphics Gems III", David Kirk, ed., Academic Press, 1992.

To create an instance of class vtkSuperquadricSource, simply invoke its constructor as follows

      obj = vtkSuperquadricSource

# Methods

The class vtkSuperquadricSource has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkSuperquadricSource class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkSuperquadricSource = obj.NewInstance ()`
- `vtkSuperquadricSource = obj.SafeDownCast (vtkObject o)`
- `obj.SetCenter (double , double , double )` - Set the center of the superquadric. Default is 0,0,0.
- `obj.SetCenter (double a[3])` - Set the center of the superquadric. Default is 0,0,0.
- `double = obj. GetCenter ()` - Set the center of the superquadric. Default is 0,0,0.
- `obj.SetScale (double , double , double )` - Set the scale factors of the superquadric. Default is 1,1,1.
- `obj.SetScale (double a[3])` - Set the scale factors of the superquadric. Default is 1,1,1.
- `double = obj. GetScale ()` - Set the scale factors of the superquadric. Default is 1,1,1.
- `int = obj.GetThetaResolution ()` - Set the number of points in the longitude direction. Initial value is 16.
- `obj.SetThetaResolution (int i)` - Set the number of points in the longitude direction. Initial value is 16.
- `int = obj.GetPhiResolution ()` - Set the number of points in the latitude direction. Initial value is 16.
- `obj.SetPhiResolution (int i)` - Set the number of points in the latitude direction. Initial value is 16.
- `double = obj.GetThickness ()` - Set/Get Superquadric ring thickness (toroids only). Changing thickness maintains the outside diameter of the toroid. Initial value is 0.3333.
- `obj.SetThickness (double )` - Set/Get Superquadric ring thickness (toroids only). Changing thickness maintains the outside diameter of the toroid. Initial value is 0.3333.
- `double = obj.GetThicknessMinValue ()` - Set/Get Superquadric ring thickness (toroids only). Changing thickness maintains the outside diameter of the toroid. Initial value is 0.3333.
- `double = obj.GetThicknessMaxValue ()` - Set/Get Superquadric ring thickness (toroids only). Changing thickness maintains the outside diameter of the toroid. Initial value is 0.3333.
- `double = obj.GetPhiRoundness ()` - Set/Get Superquadric north/south roundness. Values range from 0 (rectangular) to 1 (circular) to higher orders. Initial value is 1.0.
- `obj.SetPhiRoundness (double e)` - Set/Get Superquadric north/south roundness. Values range from 0 (rectangular) to 1 (circular) to higher orders. Initial value is 1.0.
- `double = obj.GetThetaRoundness ()` - Set/Get Superquadric east/west roundness. Values range from 0 (rectangular) to 1 (circular) to higher orders. Initial value is 1.0.
- `obj.SetThetaRoundness (double e)` - Set/Get Superquadric east/west roundness. Values range from 0 (rectangular) to 1 (circular) to higher orders. Initial value is 1.0.
- `obj.SetSize (double )` - Set/Get Superquadric isotropic size. Initial value is 0.5;
- `double = obj.GetSize ()` - Set/Get Superquadric isotropic size. Initial value is 0.5;
- `obj.ToroidalOn ()` - Set/Get whether or not the superquadric is toroidal (1) or ellipsoidal (0). Initial value is 0.
- `obj.ToroidalOff ()` - Set/Get whether or not the superquadric is toroidal (1) or ellipsoidal (0). Initial value is 0.
- `int = obj.GetToroidal ()` - Set/Get whether or not the superquadric is toroidal (1) or ellipsoidal (0). Initial value is 0.
- `obj.SetToroidal (int )` - Set/Get whether or not the superquadric is toroidal (1) or ellipsoidal (0). Initial value is 0.