Class ConstantTorsion

  extended by vmm.core.Exhibit
      extended by vmm.core3D.Exhibit3D
          extended by vmm.spacecurve.SpaceCurve
              extended by vmm.spacecurve.parametric.SpaceCurveParametric
                  extended by vmm.spacecurve.parametric.ConstantTorsion
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable

public class ConstantTorsion
extends SpaceCurveParametric

Defines a space curve of constant curvature kappa by integrating the Frenet equations with kappa=aa and a torsion function tau(t) = bb + cc*sin(t) + dd*sin(2t) + ee*sin(3t). This Class behaves like an explicitly parametrized curve, because the program precomputes the Frenet frame on 100 points between tmin and tmax so that, when the Superclass calls the method Vector3D value(), the ODEsolver only has to integrate from the nearest precomputed point.

Nested Class Summary
Nested classes/interfaces inherited from class vmm.spacecurve.parametric.SpaceCurveParametric
SpaceCurveParametric.SpaceCurveParametricView, SpaceCurveParametric.SpaceCurveParametricViewAsTube
Field Summary
Fields inherited from class vmm.spacecurve.parametric.SpaceCurveParametric
tmax, tmin, tResolution, tube, tubeSides, tubeSize, tVals
Fields inherited from class vmm.spacecurve.SpaceCurve
Fields inherited from class vmm.core3D.Exhibit3D
defaultViewpoint, defaultViewUp, previousTransform3D
Fields inherited from class vmm.core.Exhibit
decorations, exhibitNeedsRedraw, isMorphing, morphingView, parameters, previousTransform
Constructor Summary
Method Summary
protected  Vector3D[] frenetODEstep2(double tInitial, double tFinal, Vector3D[] initialVal, int numSubdivision)
          Second order method, "Step to midpoint"
protected  Vector3D[] frenetODEstep4(double tInitial, double tFinal, Vector3D[] initialVal, int numSubdivision)
 ActionList getActionsForView(View view)
          Returns a list of actions that can be applied to this exhibit in the specified view.
 int getExampleNumberFunction()
protected  double kappa(double t)
 Vector3D[] makeRepereMobile(double t)
          Returns an array of four vectors representing the Repere Mobile to the curve at a specified t value.
 void parameterChanged(Parameter param, java.lang.Object oldValue, java.lang.Object newValue)
          This method will be called automatically when a parameter that has been added to this Exhibit is changed.
 void setExampleNumberFunction(int exampleNumber)
protected  Vector3D value(double t)
          Returns a point (x(t), y(t), z(t)) on the curve, given a value of t.
Methods inherited from class vmm.spacecurve.parametric.SpaceCurveParametric
computeDrawData3D, deriv1, deriv2, doDraw3D, geographicCoordinates, getAlternativeViews, getBuildAnimation, getCenterOfPoints, getCreateAnimation, getDefaultView, getT, getTResolution, makePoints
Methods inherited from class vmm.spacecurve.SpaceCurve
getPoint, getPointCount
Methods inherited from class vmm.core3D.Exhibit3D
computeDrawDataHook, doDrawHook, getDefaultTransform, getDefaultViewpoint, getDefaultViewUp, setDefaultViewpoint, setDefaultViewUp
Methods inherited from class vmm.core.Exhibit
addChangeListener, addDecoration, addExtraXML, addParameter, addView, clearDecorations, computeDrawData, doDraw, fireExhibitChangeEvent, forceRedraw, getAdditionalAnimationsForView, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, readExtraXML, removeChangeListener, removeDecoration, removeParameter, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ConstantTorsion()
Method Detail


public int getExampleNumberFunction()


public void setExampleNumberFunction(int exampleNumber)


public ActionList getActionsForView(View view)
Description copied from class: SpaceCurveParametric
Returns a list of actions that can be applied to this exhibit in the specified view. The list depends on whether the view is of type SpaceCurveParametricView or View3DLit.

getActionsForView in class SpaceCurveParametric


public void parameterChanged(Parameter param,
                             java.lang.Object oldValue,
                             java.lang.Object newValue)
Description copied from class: Exhibit
This method will be called automatically when a parameter that has been added to this Exhibit is changed. It should not ordinarily be called directly. Note that in fact, this method simply calls forceRedraw. This method is defined in the <@link Parameterizable} interface.

Specified by:
parameterChanged in interface Parameterizable
parameterChanged in class Exhibit
param - The Parmeter whose value has been set.
oldValue - The previous value of the parameter.
newValue - The new, current value of the parameter. This is not necessarily guaranteed to be different from the old value (although it is for parameters definedin the VMM core).
See Also:


protected double kappa(double t)


protected Vector3D[] frenetODEstep2(double tInitial,
                                    double tFinal,
                                    Vector3D[] initialVal,
                                    int numSubdivision)
Second order method, "Step to midpoint"


protected Vector3D[] frenetODEstep4(double tInitial,
                                    double tFinal,
                                    Vector3D[] initialVal,
                                    int numSubdivision)


public Vector3D[] makeRepereMobile(double t)
Description copied from class: SpaceCurveParametric
Returns an array of four vectors representing the Repere Mobile to the curve at a specified t value. The array has length 4. The first vector is the point on the curve, and the other three vectors are the unit tangent, unit normal, and unit bi-normal to the curve at that point. The return value can be null, if the curve or its first or second derivative is not defined at the specified point. If the return value is non-null, then all four vectors in the returned array are non-null.

makeRepereMobile in class SpaceCurveParametric


protected Vector3D value(double t)
Description copied from class: SpaceCurveParametric
Returns a point (x(t), y(t), z(t)) on the curve, given a value of t. The return value can be null, indicating a break in the curve. Subclasses must define this method to specify a particular curve.

Specified by:
value in class SpaceCurveParametric