vmm3d.spacecurve.parametric
Class SpaceCurveParametric
- java.lang.Object
-
- vmm3d.core.Exhibit
-
- vmm3d.core3D.Exhibit3D
-
- vmm3d.spacecurve.SpaceCurve
-
- vmm3d.spacecurve.parametric.SpaceCurveParametric
-
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
- Direct Known Subclasses:
- CinquefoilKnot, ConstantCurvature, ConstantTorsion, Figure8Knot, GrannyKnot, Helix, SphericalCurve, SquareKnot, TorusKnot, UserSpaceCurveKappaTau, UserSpaceCurveParametric
public abstract class SpaceCurveParametric extends SpaceCurve
A space curve that is defined by parametric equations, giving points of the form (x(t),y(t),z(t)). A parametric curve can be rendered as a "tube" that surrounds the curve; this tube has square cross section, with the orientation of the square at a given point depending on the torsion of the curve at that point. A SpaceCurveParametric renders itself as a tube if it is being drawn in aView3DLit. In a plainView3D, it renders itself as a curve.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description classSpaceCurveParametric.SpaceCurveParametricViewDefines the default View of a SpaceCurveParametric.static classSpaceCurveParametric.SpaceCurveParametricViewAsTubeDefines a tube view of a SpaceCurveParametric.
-
Constructor Summary
Constructors Constructor and Description SpaceCurveParametric()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Vector3DgeographicCoordinates(double theta, double phi)Computes spherical coordinates (x,y,z)(theta, phi).ActionListgetActionsForView(View view)Returns a list of actions that can be applied to this exhibit in the specified view.View[]getAlternativeViews()Returns an array containing a single item, which is a View of typeView3DLit.AnimationgetBuildAnimation(View view)Returns a build animation of the tube view of the curve, that shows the tube being constructed from back to front.AnimationgetCreateAnimation(View view)Returns an animation that shows the curve being drawn bit-by-bit.ViewgetDefaultView()Returns a View of typeSpaceCurveParametric.SpaceCurveParametricViewas the default view of this curve.doublegetT(int index)Returns the t-value used to calculate the i-th point (x(t),y(t),z(t)) on the curve.intgetTResolution()Returns the t-resolution, the number of subintervals into which the interval is divided.Vector3D[]makeRepereMobile(double t)Returns an array of four vectors representing the Repere Mobile to the curve at a specified t value.-
Methods inherited from class vmm3d.spacecurve.SpaceCurve
getPoint, getPointCount
-
Methods inherited from class vmm3d.core3D.Exhibit3D
getDefaultTransform, getDefaultViewpoint, getDefaultViewUp, setDefaultViewpoint, setDefaultViewUp
-
Methods inherited from class vmm3d.core.Exhibit
addChangeListener, addDecoration, addExtraXML, addView, clearDecorations, forceRedraw, getAdditionalAnimationsForView, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, parameterChanged, readExtraXML, removeChangeListener, removeDecoration, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
-
-
-
-
Method Detail
-
geographicCoordinates
public Vector3D geographicCoordinates(double theta, double phi)
Computes spherical coordinates (x,y,z)(theta, phi). The z-axis is the pol-direction, theta = 0 gives (0,0,1), theta \in [0, pi], phi \in [0, 2 pi].
-
getT
public double getT(int index)
Returns the t-value used to calculate the i-th point (x(t),y(t),z(t)) on the curve.
-
getTResolution
public int getTResolution()
Returns the t-resolution, the number of subintervals into which the interval is divided. The size of the array that defines the curve is one plus this value.
-
makeRepereMobile
public Vector3D[] makeRepereMobile(double t)
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.
-
getDefaultView
public View getDefaultView()
Returns a View of typeSpaceCurveParametric.SpaceCurveParametricViewas the default view of this curve. In this view, the curve appears as a curve.- Overrides:
getDefaultViewin classSpaceCurve
-
getAlternativeViews
public View[] getAlternativeViews()
Returns an array containing a single item, which is a View of typeView3DLit. This is an alternative view of the curve in which the curve appears as a tube that surrounds the curve itself.- Overrides:
getAlternativeViewsin classExhibit- Returns:
- An array containing alternative views for this exhibit. In the top-level Exhibit class, the return value is null.
-
getActionsForView
public ActionList getActionsForView(View view)
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.- Overrides:
getActionsForViewin classExhibit
-
getCreateAnimation
public Animation getCreateAnimation(View view)
Returns an animation that shows the curve being drawn bit-by-bit.- Overrides:
getCreateAnimationin classExhibit- Parameters:
view- The View where the creation animation will be shown. If this is null or if it is not an instance ofSpaceCurveParametric.SpaceCurveParametricView, then the return value is null. The create animation is not used for a tube view of the curve; a build animation is used instead. A curce can be shown in a plaine View3D, but in that case no creation or build animation is used.- Returns:
- A creation animation for the given View of this Exhibit. The return value can be null to indicate that no creation animation is to be run.
- See Also:
getBuildAnimation(View)
-
getBuildAnimation
public Animation getBuildAnimation(View view)
Returns a build animation of the tube view of the curve, that shows the tube being constructed from back to front. If the view is not a View3DLit, then the return value is null. Note that a build animation is used only for the tube view of the curve; for the regular view, a create animation is used instead.- Overrides:
getBuildAnimationin classExhibit- Parameters:
view- The view into which the build animation will be installed.- Returns:
- The return value in this top-level Exhibit class is null.
- See Also:
getCreateAnimation(View)
-
-
DMelt 3.0 © DataMelt by jWork.ORG