vmm3d.surface.implicit
Class SurfaceImplicit
- java.lang.Object
-
- vmm3d.core.Exhibit
-
- vmm3d.core3D.Exhibit3D
-
- vmm3d.surface.implicit.SurfaceImplicit
-
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
- Direct Known Subclasses:
- BarthSextic, BoysSurface, CayleyCubic, ClebschCubic, CrossCap, CubeOktaeder, DecoCube, DupinCyclides, Genus2, Genus5, ImplicitCone, ImplicitEllipsoid, ImplicitHyperboloid1Sheet, ImplicitHyperboloid2Sheet, ImplicitParaboloid, Join2Tori, KummerQuartic, OrthoCircles, Pilz, Pretzel, SteinerRoman, Torus, UserSurfaceImplicit, WhitneyUmbrella
public abstract class SurfaceImplicit extends Exhibit3D
Represents a surface in three-space defined as the level set of a real-valued function of x,y,z.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description classSurfaceImplicit.ImplicitSurfaceViewclassSurfaceImplicit.Line3DA line in R^3: decribed by its direction (Vector3D direction;), a unit vector, and its intercept, (Vector3D intercept;), which is where the line intersects the plane through the origin normal to direction (this is also the point on the line that is nearest to the origin.
-
Constructor Summary
Constructors Constructor and Description SurfaceImplicit()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidcubicSolve(SurfaceImplicit.Line3D theLine, double[] theRoots)doubleFindNextRoot(SurfaceImplicit.Line3D theLine, double leftEnd, double rightEnd, double tolerance)This finds an approximate root of theFunction, on the interval [leftEnd,rightEnd] assuming that the sign of theFunction is not the same at both ends.ViewgetDefaultView()Returns the default View of this Exhibit.BasicAnimatorgetMorphingAnimation(View view, int looping)This method is meant to produce a "morph" animation for this Exhibit, by animating any applicable animateable parameters.abstract doubleheightFunction(double x, double y, double z)The implicit surface is defined as solutions of heightFuncton(x,y,z) = level .doubleheightFunction(Vector3D thePoint)voidMakeListOfRandomLines()Vector3DnormalToSurfaceAt(Vector3D P)Given a point P in R^3 and letting level = heightFunction(P), this gets the unit normal vector to the surface heightFunction = level at the point P by normalizing the gradient of the heightFunction at P.voidquadraticSolve(SurfaceImplicit.Line3D theLine, double[] theRoots)This calculates the real roots (if any) of theEquation when it is a quadratic polynomial and stores them in theRootsvoidquarticSolve(SurfaceImplicit.Line3D theLine, double[] theRoots)voidremoveView(View view)Overridden to shut down the task manager that is used for parallelization, when there are no more views of the exhibit.doubletheFunction(double t, SurfaceImplicit.Line3D theLine)This is the function whose vanishing gives a parameter value t such that a point of the line with that parameter value lies on the implicit surface.-
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, getActionsForView, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getCreateAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultWindow, getFramesForMorphing, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, parameterChanged, readExtraXML, removeChangeListener, removeDecoration, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
-
-
-
-
Method Detail
-
heightFunction
public abstract double heightFunction(double x, double y, double z)The implicit surface is defined as solutions of heightFuncton(x,y,z) = level .
-
heightFunction
public double heightFunction(Vector3D thePoint)
-
normalToSurfaceAt
public Vector3D normalToSurfaceAt(Vector3D P)
Given a point P in R^3 and letting level = heightFunction(P), this gets the unit normal vector to the surface heightFunction = level at the point P by normalizing the gradient of the heightFunction at P.
-
removeView
public void removeView(View view)
Overridden to shut down the task manager that is used for parallelization, when there are no more views of the exhibit.- Overrides:
removeViewin classExhibit- Parameters:
view- The view that is no longer displaying this exhibit.
-
MakeListOfRandomLines
public void MakeListOfRandomLines()
-
theFunction
public double theFunction(double t, SurfaceImplicit.Line3D theLine)This is the function whose vanishing gives a parameter value t such that a point of the line with that parameter value lies on the implicit surface. That is, if theFunction(t, theLine) = 0, then theLine.parametricEquation(t) is a point of the surface
-
quadraticSolve
public void quadraticSolve(SurfaceImplicit.Line3D theLine, double[] theRoots)
This calculates the real roots (if any) of theEquation when it is a quadratic polynomial and stores them in theRoots
-
cubicSolve
public void cubicSolve(SurfaceImplicit.Line3D theLine, double[] theRoots)
-
quarticSolve
public void quarticSolve(SurfaceImplicit.Line3D theLine, double[] theRoots)
-
FindNextRoot
public double FindNextRoot(SurfaceImplicit.Line3D theLine, double leftEnd, double rightEnd, double tolerance)
This finds an approximate root of theFunction, on the interval [leftEnd,rightEnd] assuming that the sign of theFunction is not the same at both ends. It uses an optimized verison of RegulaFalsi due to Hermann Karcher.
-
getDefaultView
public View getDefaultView()
Description copied from class:Exhibit3DReturns the default View of this Exhibit. In the Exhibit3D class, the return value is a basicView3D.- Overrides:
getDefaultViewin classExhibit3D
-
getMorphingAnimation
public BasicAnimator getMorphingAnimation(View view, int looping)
Description copied from class:ExhibitThis method is meant to produce a "morph" animation for this Exhibit, by animating any applicable animateable parameters. The parameters can come from the Exhibit, from the View, and, in the case of aUserExhibitfrom the function parameters of the user exhibit. If there are no Animateable parameters, the return value is null. Otherwise, the return value is aBasicAnimatorto which all of the Exhibit'sAnimateableparameters have been added. The number of frames in the animation returned by this method is the value of the "framesForMorphing" property. Subclasses might want to override this method to provide more complex morphing animations, but they should follow the same pattern. In particular, any parmeter values that are changed during the animation should be restored to their original values when the animation ends.- Overrides:
getMorphingAnimationin classExhibit- Parameters:
view- The view that the animation will be shown in, if any. If the value is null, then the animation will not be associated with any particular view. In that case, the Morphing animation will animate the Exhibit in all Views in which it appears, since it operates by changing parameters of the exhibit. If the View is non-null, then only the specified View will receive changeEvents from the Exhibit while the morph is in progress.looping- This must be one of the valuesBasicAnimator.ONCE,BasicAnimator.LOOP, orBasicAnimator.OSCILLATE. The value is passed, without any error checking, to the animation'ssetLoopingmethod.- See Also:
TimerAnimation.setLooping(int),Exhibit.setFramesForMorphing(int)
-
-
DMelt 3.0 © DataMelt by jWork.ORG