vmm3d.surface.implicit

## Class SurfaceImplicit

- java.lang.Object
- vmm3d.core.Exhibit
- vmm3d.core3D.Exhibit3D
- vmm3d.surface.implicit.SurfaceImplicit

- All Implemented Interfaces:
- EventListener, 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 SurfaceImplicitextends 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 `class`

**SurfaceImplicit.ImplicitSurfaceView**`class`

**SurfaceImplicit.Line3D**A 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

Methods Modifier and Type Method and Description `void`

**cubicSolve**(SurfaceImplicit.Line3D theLine, double[] theRoots)`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.`View`

**getDefaultView**()Returns the default View of this Exhibit.`BasicAnimator`

**getMorphingAnimation**(View view, int looping)This method is meant to produce a "morph" animation for this Exhibit, by animating any applicable animateable parameters.`abstract double`

**heightFunction**(double x, double y, double z)The implicit surface is defined as solutions of heightFuncton(x,y,z) = level .`double`

**heightFunction**(Vector3D thePoint)`void`

**MakeListOfRandomLines**()`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.`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`void`

**quarticSolve**(SurfaceImplicit.Line3D theLine, double[] theRoots)`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.`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.### 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:**`removeView`

in class`Exhibit`

- 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:**`Exhibit3D`

Returns the default View of this Exhibit. In the Exhibit3D class, the return value is a basic`View3D`

.**Overrides:**`getDefaultView`

in class`Exhibit3D`

#### getMorphingAnimation

public BasicAnimator getMorphingAnimation(View view, int looping)

**Description copied from class:**`Exhibit`

This 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 a`UserExhibit`

from the function parameters of the user exhibit. If there are no Animateable parameters, the return value is null. Otherwise, the return value is a`BasicAnimator`

to which all of the Exhibit's`Animateable`

parameters 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:**`getMorphingAnimation`

in class`Exhibit`

- 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 values`BasicAnimator.ONCE`

,`BasicAnimator.LOOP`

, or`BasicAnimator.OSCILLATE`

. The value is passed, without any error checking, to the animation's`setLooping`

method.- See Also:
`TimerAnimation.setLooping(int)`

,`Exhibit.setFramesForMorphing(int)`

**SCaVis 2.0 © jWork.ORG**