vmm.surface.parametric Class WeierstrassMinimalSurface

java.lang.Object
vmm.core.Exhibit
vmm.core3D.Exhibit3D
vmm.surface.Surface
vmm.surface.parametric.SurfaceParametric
vmm.surface.parametric.WeierstrassMinimalSurface

All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
Direct Known Subclasses:
CatenoidEnneper, CatenoidFence, ChenGackstatter, CostaHoffmanMeeks, DoubleEnneper, DoublyPeriodicJD, DoublyPeriodicJE, Helicoid_Weierstrass, LidinoidHfamily, LopezRosNoGo, OtherTriangCatenoid, PlanarEnneper, Riemann, Scherk_Weierstrass, SchoenCLPsurface, SchoenGyroid, SchwarzHsurface, SchwarzPDsurface, Skew_K_noid, Symmetric_K_Noid, WavyEnneper_Weierstrass

public abstract class WeierstrassMinimalSurfaceextends SurfaceParametric

Abstract Weierstrass Minimal Surface

Nested Class Summary
 class WeierstrassMinimalSurface.WMSView
The View class for WeierstrassMinimalSurfaces, overridden *only* to add the Show Conjugate Surface and number of pieces actions to the correct place in the Action menu.

Field Summary
 RealParamAnimateable afp

protected  double AFP

protected  boolean canShowConjugateSurface
Set this variable to true in the constructor of a subclass to add the showConjugagteSurfaceAction to the Action menu for that subclass.
protected static Complex del

protected  double distFrom0

protected  double du

protected  double dv

protected  boolean flag0

protected  boolean flag05

protected  ComplexVector3D halfPeriod

protected  ComplexVector3D[][] helperArray

static Complex I__C

static Complex I_C

static Complex I1_C

static Complex I2_C

static Complex I3_C

static Complex I4_C

protected  boolean iBeginMiddleInHelper

protected  boolean iFirstInHelper

protected  boolean inAssociateMorph

static Complex IP__C

static Complex IP_C

protected  double LRPclosed

protected  int[] multipleCopyOptions
Some subclasses of WeirstrassMinimalSurface offer the possibility of showing different numbers of copies of the fundamental piece.
protected  boolean needsPeriodClosed

protected  boolean needsValueArray

static Complex ONE__C

static Complex ONE_C

protected  int ucount

protected  int vcount

protected  boolean wantsToSeeDomain

protected  boolean wantsToSeeGaussImage

static Complex ZERO_C

Fields inherited from class vmm.surface.parametric.SurfaceParametric
COLOR_GAUSS_CURVATURE, COLOR_MEAN_CURVATURE, COLOR_TWO_SIDED_DEFAULT, COLOR_TWO_SIDED_USER, COLOR_USER, COLOR_USER_FUNCTION_HSB, COLOR_USER_FUNCTION_RGB, COLOR_WHITE, umax, umin, vmax, vmin

Fields inherited from class vmm.surface.Surface
data, uPatchCount, vPatchCount

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
WeierstrassMinimalSurface()

Method Summary
protected  ComplexVector3D ComplexVectorFunction(Complex z)
The auxiliary Weierstrass Integrand: ComplexVector3D(dh*g, dh/g, 2dh) See helperToMinimal for converting the integral values into surface points.
 ComplexVector3D ComplexVectorIntegrator(Complex zInitial, Complex zFinal, int numSteps)

 ComplexVector3D ComplexVectorOneStepIntegrator(Complex zInitial, Complex zFinal)

protected  Complex component3(Complex z)
Integrate g*dh, 1/g*dh and compute first and second component of the Weierstrass integral \int ( 1/g - g, (1/g + g)*I_C, 2) * dh after the integration
 void computeHalfPeriod()

protected  void createData()
Overrides createData from SurfaceParametric with the goal of recomputing all constants that go into the Weierstrass Data, and then do the helperArray.
 void createHelperArray()
The helperArray is filled with auxiliary data from which the surface points can be computed quickly in public Vector3D surfacePoint(double u, double v).
protected  void doClosingJob()
Dummy function.
protected  Complex domainGrid(double u, double v)
Most minimal surfaces need a specially adapted domain grid.
protected abstract  Complex gauss(Complex z)
The following two abstract functions are the Weierstrass Data, they need to be specified to define a minimal surface.
protected  Complex gaussInverseTimesHPrime(Complex z)

protected  Complex gaussTimesHPrime(Complex z)

 ActionList getAdditionalAnimationsForView(View view)
This method returns a list of ActionItem that will be added to the Animation menu of the 3dxm applicaiton.
protected  ComplexVector3D getCenter()
The next function is used to center the helperArray, mostly overridden
 View getDefaultView()
Returns a default view of this exhibit, a View of type SurfaceView.
 int getNumberOfPieces()

 ComplexVector3D helperToMinimal(ComplexVector3D hp)
The integrated values that are collected in ComplexVector3D[][] helperArray are here converted to points of the holomorphic null curve in C^3 whose real and imaginary parts are minimal surfaces in R^3.
protected abstract  Complex hPrime(Complex z)

protected  Complex intersectLines(Complex z1, Complex z2, Complex w1, Complex w2)
Auxiliary function.
 ComplexVector3D minimalToHelper(ComplexVector3D mn)
Inverse function to the previous helperToMinimal.
protected static double monotonPow(double u, int e)
Auxiliary function.
 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.
protected  void redoConstants()
redoConstants is called in createData above, before any other computations start.
 void setNumberOfPieces(int numberOfPieces)

 Vector3D surfaceNormal(double u, double v)
The surface normal is called often while rendering the surface.
 Vector3D surfacePoint(double u, double v)
This function lets a minimal surface that is defined by Weierstrass Data behave as if it were given by an explicit parametrization.

Methods inherited from class vmm.surface.parametric.SurfaceParametric
addExtraXML, deriv_u, deriv_v, gaussMap, getActionsForView, readExtraXML, removeView

Methods inherited from class vmm.surface.Surface
computeDrawData3D, doDraw3D, getBuildAnimation, getDefaultOrientation, setDefaultOrientation

Methods inherited from class vmm.core3D.Exhibit3D
computeDrawDataHook, doDrawHook, getDefaultTransform, getDefaultViewpoint, getDefaultViewUp, setDefaultViewpoint, setDefaultViewUp

Methods inherited from class vmm.core.Exhibit
addChangeListener, addDecoration, addParameter, addView, clearDecorations, computeDrawData, doDraw, fireExhibitChangeEvent, forceRedraw, getAlternativeViews, getCreateAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, removeChangeListener, removeDecoration, removeParameter, 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

Field Detail

ZERO_C

public static final Complex ZERO_C

ONE_C

public static final Complex ONE_C

ONE__C

public static final Complex ONE__C

IP_C

public static final Complex IP_C

IP__C

public static final Complex IP__C

I_C

public static final Complex I_C

I__C

public static final Complex I__C

I1_C

public static final Complex I1_C

I2_C

public static final Complex I2_C

I3_C

public static final Complex I3_C

I4_C

public static final Complex I4_C

del

protected static final Complex del

afp

public RealParamAnimateable afp

canShowConjugateSurface

protected boolean canShowConjugateSurface
Set this variable to true in the constructor of a subclass to add the showConjugagteSurfaceAction to the Action menu for that subclass.

multipleCopyOptions

protected int[] multipleCopyOptions
Some subclasses of WeirstrassMinimalSurface offer the possibility of showing different numbers of copies of the fundamental piece. The default view shows a certain number of pieces, and there can be options for showing double, triple, etc. that nubmer of pieces. This array can be set to a non-null value in the constructor of a subclass to indicate that such options are available. The integers in the array should give the allowable multiples of the default number of copies. For example, setting multipleCopySelections to {2} indicates that double the basic number of copies can be shown. Setting it to {2,3} indicates that double or triple the number of copies can be shown.

ucount

protected int ucount

vcount

protected int vcount

iFirstInHelper

protected boolean iFirstInHelper

iBeginMiddleInHelper

protected boolean iBeginMiddleInHelper

du

protected double du

dv

protected double dv

distFrom0

protected double distFrom0

AFP

protected double AFP

LRPclosed

protected double LRPclosed

helperArray

protected ComplexVector3D[][] helperArray

halfPeriod

protected ComplexVector3D halfPeriod

flag0

protected boolean flag0

flag05

protected boolean flag05

wantsToSeeDomain

protected boolean wantsToSeeDomain

wantsToSeeGaussImage

protected boolean wantsToSeeGaussImage

needsValueArray

protected boolean needsValueArray

needsPeriodClosed

protected boolean needsPeriodClosed

inAssociateMorph

protected boolean inAssociateMorph
Constructor Detail

WeierstrassMinimalSurface

public WeierstrassMinimalSurface()
Method Detail

createData

protected void createData()
Overrides createData from SurfaceParametric with the goal of recomputing all constants that go into the Weierstrass Data, and then do the helperArray. The recomputation should be done before super.createData() is called.

Overrides:
createData in class SurfaceParametric

domainGrid

protected Complex domainGrid(double u,
double v)
Most minimal surfaces need a specially adapted domain grid. The default grid is the standard cartesian one.

gauss

protected abstract Complex gauss(Complex z)
The following two abstract functions are the Weierstrass Data, they need to be specified to define a minimal surface. Locally, no other information is needed.

hPrime

protected abstract Complex hPrime(Complex z)

getCenter

protected ComplexVector3D getCenter()
The next function is used to center the helperArray, mostly overridden

intersectLines

protected Complex intersectLines(Complex z1,
Complex z2,
Complex w1,
Complex w2)
Auxiliary function. Intersects the lines through Complex z1,z2 and through Complex w1,w2.

monotonPow

protected static double monotonPow(double u,
int e)
Auxiliary function. monotonPow(u,e) = u*|u|^(e-1)

doClosingJob

protected void doClosingJob()
Dummy function. Needs to be specified if (needsPeriodClosing) is ever TRUE

redoConstants

protected void redoConstants()
redoConstants is called in createData above, before any other computations start.

gaussTimesHPrime

protected Complex gaussTimesHPrime(Complex z)

gaussInverseTimesHPrime

protected Complex gaussInverseTimesHPrime(Complex z)

component3

protected Complex component3(Complex z)
Integrate g*dh, 1/g*dh and compute first and second component of the Weierstrass integral \int ( 1/g - g, (1/g + g)*I_C, 2) * dh after the integration

surfaceNormal

public Vector3D surfaceNormal(double u,
double v)
The surface normal is called often while rendering the surface. For Weierstrass surfaces the normal is known well before the surface points are known. The normal should never be computed numerically. Therefore the following overrides the numerical differentiation.

Overrides:
surfaceNormal in class SurfaceParametric

ComplexVectorFunction

protected ComplexVector3D ComplexVectorFunction(Complex z)
The auxiliary Weierstrass Integrand: ComplexVector3D(dh*g, dh/g, 2dh) See helperToMinimal for converting the integral values into surface points. Weierstrass integral: \int ( 1/g - g, (1/g + g)*I_C, 2) * dh

ComplexVectorOneStepIntegrator

public ComplexVector3D ComplexVectorOneStepIntegrator(Complex zInitial,
Complex zFinal)

ComplexVectorIntegrator

public ComplexVector3D ComplexVectorIntegrator(Complex zInitial,
Complex zFinal,
int numSteps)

surfacePoint

public Vector3D surfacePoint(double u,
double v)
This function lets a minimal surface that is defined by Weierstrass Data behave as if it were given by an explicit parametrization.

Specified by:
surfacePoint in class SurfaceParametric

helperToMinimal

public ComplexVector3D helperToMinimal(ComplexVector3D hp)
The integrated values that are collected in ComplexVector3D[][] helperArray are here converted to points of the holomorphic null curve in C^3 whose real and imaginary parts are minimal surfaces in R^3.

minimalToHelper

public ComplexVector3D minimalToHelper(ComplexVector3D mn)
Inverse function to the previous helperToMinimal.

createHelperArray

public void createHelperArray()
The helperArray is filled with auxiliary data from which the surface points can be computed quickly in public Vector3D surfacePoint(double u, double v). The routine can either start with the i-line j=0 first and use these values to start the integration along the j-curves -- or it can do the j-curve i=0 first and compute the i-curves from there. One tries to have no singular or numerically difficult points on the first curve.

computeHalfPeriod

public void computeHalfPeriod()

public ActionList getAdditionalAnimationsForView(View view)
Description copied from class: Exhibit
This method returns a list of ActionItem that will be added to the Animation menu of the 3dxm applicaiton. The values in the list should ordinarily be commands (i.e. AbstractActionVMM) that run animations (although there is no way to enforce this restriction). These animations commands are in addition to the standard "Morph" and "Cyclic Morph" commands. Note that these commands are added to those returned by View.getAdditionalAnimations().

In this top-level Exhibit class, the return value is a an empty list (but not null). In general, when overriding this method, subclasses should call "super.getAdditionalAnimationsForView()" to obtain a list of actions from the superclass. It can then add additional actions or remove or disable actions that are in the list from the superclass.

Overrides:
getAdditionalAnimationsForView in class Exhibit
Parameters:
view - The view in which the animations will be run.

getNumberOfPieces

public int getNumberOfPieces()

setNumberOfPieces

public void setNumberOfPieces(int numberOfPieces)

parameterChanged

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
Overrides:
parameterChanged in class Exhibit
Parameters:
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).
Exhibit.forceRedraw()
public View getDefaultView()
Description copied from class: Surface
Returns a default view of this exhibit, a View of type SurfaceView. (Note: If a Surface is displayed in a plain View3D, it will always appear as a wireframe.)
getDefaultView in class Surface