JavaView® v2.12

vgp.surface.common
Class PgSurfaceDescr

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jvx.surface.PgDomainDescr
              |
              +--vgp.surface.common.PgSurfaceDescr
All Implemented Interfaces:
java.lang.Cloneable, PsUpdateIf, java.io.Serializable
Direct Known Subclasses:
PgSurface_Boy, PgSurface_Catalan, PgSurface_CatenoidHelicoid, PgSurface_Cliffordtorus, PgSurface_ConicType, PgSurface_Cylinder, PgSurface_DupinCycloid, PgSurface_Ellipsoid, PgSurface_EllipticParaboloid, PgSurface_Enneper, PgSurface_FootballBarrel, PgSurface_Fresnel1, PgSurface_Fresnel2, PgSurface_Henneberg, PgSurface_Hopftorus, PgSurface_HyperbolicHelicoid, PgSurface_HyperbolicParaboloid, PgSurface_HyperboloidType, PgSurface_KleinBottle, PgSurface_Kuen, PgSurface_LowerHyperboloid, PgSurface_MoebiusStrip, PgSurface_OuterHyperboloid, PgSurface_PseudoSphere, PgSurface_Sphere, PgSurface_SphereWithParams, PgSurface_StereographicSphere, PgSurface_Torus, PgSurface_UpperHyperboloid

public abstract class PgSurfaceDescr
extends PgDomainDescr

Describes a parametrized function including higher derivatives and fundamental forms. Subclasses should override methods with prefix calc_. If derivatives are not overridden, this superclass approximates derivatives using finite differences. External classes must call the public methods, and not the calc_ methods, since the public classes are optimized using buffers with previously computed values.

A function object should be create somewhere else and set via setFunction(). For example, a subclass may do the task. If there exists a function object, and a user has modified this function object in the info panel, then the descriptor no longer uses the smooth derivatives but approximates derivatives using the finite difference methods.

Version:
24.03.01, 2.50 revised (kp) List of surfaces made final.
28.10.99, 2.30 revised (sk) Adapted for scene handling.
27.08.99, 2.20 revised (kp) Name PgDomain changed to PgDomainDescr.
11.07.99, 2.10 revised (sk) New functions added.
09.07.99, 2.02 revised (kp) Flag for expression evaluation is now correctly modified.
04.07.99, 2.01 revised (kp) Eval() instead of fun() for function evaluation.
00.00.99, 2.00 revised (ep, sk) All fundamental form calculations added.
00.00.98, 1.00 created (kp) First skeleton.
Author:
Eike Preuss, Samy Khadem, Konrad Polthier
See Also:
eval(PdVector, double, double), Serialized Form

Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, NUM_TAGS
 
Constructor Summary
PgSurfaceDescr()
           
 
Method Summary
 void addParameter(PsObject parm)
          Store function parameters in vector as PuDouble and PuInteger objects.
 PdMatrix[] christoffel(double u, double v)
           
 PdVector ddf_dUdU(double u, double v)
           
 PdVector ddf_dUdV(double u, double v)
           
 PdVector ddf_dVdV(double u, double v)
           
 PdVector df_dU(double u, double v)
          buffered versions, used by all other classes, should not be overwritten
 PdVector df_dV(double u, double v)
           
 PdMatrix df(double u, double v)
           
 PdVector dN_dU(double u, double v)
           
 PdVector dN_dV(double u, double v)
           
 PdMatrix dN(double u, double v)
           
 PdVector eval(PdVector f, double u, double v)
          Buffered version of calc_f, should not be overridden.
 PdMatrix firstFundamental(double u, double v)
           
 int getAmbientProjection()
          Get projection mode of ambient space used in model transformations.
 int getAmbientSpace()
          Get ambient space used in model transformations.
 int getDimOfSurface()
          Get dimension of ambient space in which surface is immersed.
 PuFunction getFunction()
          Get function object, e.g. to modify function strings.
static java.lang.String[] getListOfScenes()
          Get list of existing scenes.
static java.lang.String[] getListOfSurfaces()
          Get list of existing surface descriptors.
 PsObject getParameter(java.lang.String parmLabel)
          Return stored function parameters as PuDouble or PuInteger objects.
 java.util.Enumeration getParameters()
          Return stored function parameters as PuDouble or PuInteger objects.
 void init()
          Initialize and reset data structure and all instance variables.
 boolean isUPeriodic()
           
 boolean isVPeriodic()
           
 PdVector normal(double u, double v)
           
 PdMatrix secondFundamental(double u, double v)
           
 void setAmbientProjection(int mode)
          Set projection mode of ambient space used in model transformations.
 void setAmbientSpace(int mode)
          Set ambient space used in model transformations.
 void setDimOfSurface(int dim)
          Set dimension of ambient space in which surface is immersed.
 boolean setFunction(PuFunction fun)
          Set function object, which has been setup somewhere else.
 boolean update(java.lang.Object event)
          Catch events from function strings.
 boolean useFunctionExpression()
          Check whether function string has been modified by user.
 void useFunctionExpression(boolean flag)
          Set flag whether function string has been modified by user.
 PdMatrix weingarten(double u, double v)
           
 
Methods inherited from class jvx.surface.PgDomainDescr
eval, getNumULines, getNumVLines, getUMax, getUMin, getVMax, getVMin, isShowingULine, isShowingVLine, setDiscr, setDiscrBounds, setMaxSize, setNumULines, setNumVLines, setSize, setUMax, setUMin, setVMax, setVMin, showULine, showVLine
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, updatePanels
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PgSurfaceDescr

public PgSurfaceDescr()
Method Detail

init

public void init()
Description copied from class: PgDomainDescr
Initialize and reset data structure and all instance variables.
Overrides:
init in class PgDomainDescr

getAmbientSpace

public int getAmbientSpace()
Get ambient space used in model transformations.

setAmbientSpace

public void setAmbientSpace(int mode)
Set ambient space used in model transformations.

getAmbientProjection

public int getAmbientProjection()
Get projection mode of ambient space used in model transformations.

setAmbientProjection

public void setAmbientProjection(int mode)
Set projection mode of ambient space used in model transformations.

getDimOfSurface

public int getDimOfSurface()
Get dimension of ambient space in which surface is immersed.

setDimOfSurface

public void setDimOfSurface(int dim)
Set dimension of ambient space in which surface is immersed.

If function expressions exist, then the number of function expressions must be equal to the surface dimension. Otherwise, the number of expresssions is adjusted in this method.


getListOfSurfaces

public static java.lang.String[] getListOfSurfaces()
Get list of existing surface descriptors.

getListOfScenes

public static java.lang.String[] getListOfScenes()
Get list of existing scenes.

getFunction

public PuFunction getFunction()
Get function object, e.g. to modify function strings.

setFunction

public boolean setFunction(PuFunction fun)
Set function object, which has been setup somewhere else. The number of functions must not be modified after this assignment. Each function must have variables 'u' and 'v'.

useFunctionExpression

public boolean useFunctionExpression()
Check whether function string has been modified by user.

useFunctionExpression

public void useFunctionExpression(boolean flag)
Set flag whether function string has been modified by user.

isUPeriodic

public boolean isUPeriodic()

isVPeriodic

public boolean isVPeriodic()

update

public boolean update(java.lang.Object event)
Catch events from function strings. Update the class whenever a child has changed. Method is usually invoked from the children.
Overrides:
update in class PgDomainDescr
Following copied from class: jv.object.PsObject
See Also:
PsObject.setParent(PsUpdateIf), PsObject.getFather(), PsObject.addUpdateListener(PsUpdateIf)

addParameter

public void addParameter(PsObject parm)
Store function parameters in vector as PuDouble and PuInteger objects. Use getParameter(String) to return parameter objects.
See Also:
getParameter(String)

getParameter

public PsObject getParameter(java.lang.String parmLabel)
Return stored function parameters as PuDouble or PuInteger objects. Use addParameter(PsObject) to store function parameter.
See Also:
addParameter(PsObject)

getParameters

public java.util.Enumeration getParameters()
Return stored function parameters as PuDouble or PuInteger objects. Use addParameter(PsObject) to store function parameter.
See Also:
addParameter(PsObject)

eval

public PdVector eval(PdVector f,
                     double u,
                     double v)
Buffered version of calc_f, should not be overridden. Size of argument vector f will be modified if vector is too small.

df_dU

public PdVector df_dU(double u,
                      double v)
buffered versions, used by all other classes, should not be overwritten

df_dV

public PdVector df_dV(double u,
                      double v)

df

public PdMatrix df(double u,
                   double v)

ddf_dUdU

public PdVector ddf_dUdU(double u,
                         double v)

ddf_dUdV

public PdVector ddf_dUdV(double u,
                         double v)

ddf_dVdV

public PdVector ddf_dVdV(double u,
                         double v)

normal

public PdVector normal(double u,
                       double v)

dN_dU

public PdVector dN_dU(double u,
                      double v)

dN_dV

public PdVector dN_dV(double u,
                      double v)

dN

public PdMatrix dN(double u,
                   double v)

firstFundamental

public PdMatrix firstFundamental(double u,
                                 double v)

secondFundamental

public PdMatrix secondFundamental(double u,
                                  double v)

weingarten

public PdMatrix weingarten(double u,
                           double v)

christoffel

public PdMatrix[] christoffel(double u,
                              double v)

JavaView® v2.12

The software JavaView® is copyright protected. All Rights Reserved.