Class PgSurfaceDescr
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.surface.PgDomainDescr
-
- vgp.surface.common.PgSurfaceDescr
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf
- Direct Known Subclasses:
- PgSurface_Boy, PgSurface_Breather, PgSurface_BreatherPQ, PgSurface_Catalan, PgSurface_CatenoidHelicoid, PgSurface_Cliffordtorus, PgSurface_Cone, PgSurface_ConicType, PgSurface_Cylinder, PgSurface_Dini, 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_KleinBottleUgly, PgSurface_Kuen, PgSurface_LawsonHelicoid, PgSurface_LowerHyperboloid, PgSurface_MoebiusStrip, PgSurface_OuterHyperboloid, PgSurface_PseudoSphere, PgSurface_Sievert, PgSurface_Sphere, PgSurface_SphereWithParams, PgSurface_StereographicSphere, PgSurface_Tannery, PgSurface_Torus, PgSurface_UpperHyperboloid, PgSurface_Zoll
public abstract class PgSurfaceDescr extends PgDomainDescr
Describes a parametrized function including higher derivatives and fundamental forms. Subclasses should override methods with prefixcalc_. 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.- See Also:
eval(PdVector, double, double), Serialized Form- Author:
- Konrad Polthier, Samy Khadem, Eike Preuss
- Version:
- 04.08.03, 2.60 revised (kp) Clone and copy implemented.
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.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringBASE_SURFACE_NAMEBase name of all surface descriptors.static intBOYstatic intBREATHERstatic intBREATHER_PQstatic intCATALANstatic intCATENOID_HELICOIDstatic intCATENOID_HELICOID_SCENEstatic intCLIFFORD_TORUSstatic intCONEstatic intCONIC_TYPEstatic intCYLINDERstatic intDINIstatic intDUPIN_CYCLOIDstatic intDUPIN_SCENEstatic intELLIPSOIDstatic intELLIPTIC_PARABOLOIDstatic intENNEPERstatic intFOOTBALL_BARRELstatic intFRESNEL1static intFRESNEL2static intH3_HYPERBOLIC_HELICOIDstatic intHENNEBERGstatic intHYPERBOLIC_PARABLOIDstatic intHYPERBOLOID_SCENEstatic intHYPERBOLOID_TYPEstatic intKLEINBOTTLEstatic intKUENstatic intLOWER_HYPERBOLOIDstatic intMOEBIUS_STRIPstatic intOUTER_HYPERBOLOIDstatic intPSEUDOSPHEREstatic intS3_HOPFTORUSstatic intS3_LAWSON_HELICOIDstatic intSIEVERTstatic intSPHEREstatic intSTEREOGRAPHIC_SPHEREstatic intTANNERYstatic intTORUSstatic intUPPER_HYPERBOLOIDstatic intZOLL-
Fields inherited from class jv.object.PsObject
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
-
-
Constructor Summary
Constructors Constructor and Description PgSurfaceDescr()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddParameter(PsObject parm)Store function parameters in vector as PuDouble and PuInteger objects.booleancalc_f(PdVector f, double u, double v)Internal function called by eval(..) to compute function value.PdMatrix[]christoffel(double u, double v)java.lang.Objectclone()Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners.voidcopy(PsObject object)Copy instance variables by duplication, not by copying a reference.PdVectorddf_dUdU(double u, double v)PdVectorddf_dUdV(double u, double v)PdVectorddf_dVdV(double u, double v)PdVectordf_dU(double u, double v)Buffered versions, used by all other classes, should not be overwritten.PdVectordf_dV(double u, double v)PdMatrixdf(double u, double v)PdVectordN_dU(double u, double v)PdVectordN_dV(double u, double v)PdMatrixdN(double u, double v)PdVectoreval(PdVector f, double u, double v)Buffered version of calc_f, should not be overridden.PdMatrixfirstFundamental(double u, double v)intgetAmbientProjection()Get projection mode of ambient space used in model transformations.intgetAmbientSpace()Get ambient space used in model transformations.intgetDimOfSurface()Get dimension of ambient space in which surface is immersed.PuFunctiongetFunction()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.PsObjectgetParameter(java.lang.String parmLabel)Return stored function parameters as PuDouble or PuInteger objects.java.util.EnumerationgetParameters()Return stored function parameters as PuDouble or PuInteger objects.voidinit()Initialize and reset data structure and all instance variables.booleanisUPeriodic()Determine if surface is periodic in u-direction.booleanisVPeriodic()Determine if surface is periodic in v-direction.PdVectornormal(double u, double v)PdMatrixsecondFundamental(double u, double v)voidsetAmbientProjection(int mode)Set projection mode of ambient space used in model transformations.voidsetAmbientSpace(int mode)Set ambient space used in model transformations.voidsetDimOfSurface(int dim)Set dimension of ambient space in which surface is immersed.booleansetFunction(PuFunction fun)Set function object, which has been setup somewhere else.booleanupdate(java.lang.Object event)Catch events from function strings.booleanuseFunctionExpression()Check whether function string has been modified by user.voiduseFunctionExpression(boolean flag)Set flag whether function string has been modified by user.PdMatrixweingarten(double u, double v)-
Methods inherited from class jvx.surface.PgDomainDescr
eval, getNameOfLines, getNumULines, getNumVLines, getUMax, getUMin, getVMax, getVMin, isShowingULine, isShowingVLine, setDiscr, setDiscrBounds, setMaxSize, setNameOfLines, setNumULines, setNumVLines, setSize, setUMax, setUMin, setVMax, setVMin, showULine, showVLine, toString
-
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, updatePanels
-
-
-
-
Field Detail
-
BASE_SURFACE_NAME
public static final java.lang.String BASE_SURFACE_NAME
Base name of all surface descriptors.- See Also:
- Constant Field Values
- Version:
- 26.10.16, 1.00 created (kp) Move here from PjSurface.
-
BOY
public static final int BOY
- See Also:
- Constant Field Values
-
BREATHER
public static final int BREATHER
- See Also:
- Constant Field Values
-
BREATHER_PQ
public static final int BREATHER_PQ
- See Also:
- Constant Field Values
-
CATALAN
public static final int CATALAN
- See Also:
- Constant Field Values
-
CATENOID_HELICOID
public static final int CATENOID_HELICOID
- See Also:
- Constant Field Values
-
CATENOID_HELICOID_SCENE
public static final int CATENOID_HELICOID_SCENE
- See Also:
- Constant Field Values
-
CLIFFORD_TORUS
public static final int CLIFFORD_TORUS
- See Also:
- Constant Field Values
-
CONE
public static final int CONE
- See Also:
- Constant Field Values
-
CONIC_TYPE
public static final int CONIC_TYPE
- See Also:
- Constant Field Values
-
CYLINDER
public static final int CYLINDER
- See Also:
- Constant Field Values
-
DINI
public static final int DINI
- See Also:
- Constant Field Values
-
DUPIN_CYCLOID
public static final int DUPIN_CYCLOID
- See Also:
- Constant Field Values
-
DUPIN_SCENE
public static final int DUPIN_SCENE
- See Also:
- Constant Field Values
-
ELLIPSOID
public static final int ELLIPSOID
- See Also:
- Constant Field Values
-
ELLIPTIC_PARABOLOID
public static final int ELLIPTIC_PARABOLOID
- See Also:
- Constant Field Values
-
ENNEPER
public static final int ENNEPER
- See Also:
- Constant Field Values
-
FOOTBALL_BARREL
public static final int FOOTBALL_BARREL
- See Also:
- Constant Field Values
-
FRESNEL1
public static final int FRESNEL1
- See Also:
- Constant Field Values
-
FRESNEL2
public static final int FRESNEL2
- See Also:
- Constant Field Values
-
HENNEBERG
public static final int HENNEBERG
- See Also:
- Constant Field Values
-
S3_HOPFTORUS
public static final int S3_HOPFTORUS
- See Also:
- Constant Field Values
-
H3_HYPERBOLIC_HELICOID
public static final int H3_HYPERBOLIC_HELICOID
- See Also:
- Constant Field Values
-
HYPERBOLIC_PARABLOID
public static final int HYPERBOLIC_PARABLOID
- See Also:
- Constant Field Values
-
HYPERBOLOID_SCENE
public static final int HYPERBOLOID_SCENE
- See Also:
- Constant Field Values
-
HYPERBOLOID_TYPE
public static final int HYPERBOLOID_TYPE
- See Also:
- Constant Field Values
-
KLEINBOTTLE
public static final int KLEINBOTTLE
- See Also:
- Constant Field Values
-
KUEN
public static final int KUEN
- See Also:
- Constant Field Values
-
S3_LAWSON_HELICOID
public static final int S3_LAWSON_HELICOID
- See Also:
- Constant Field Values
-
LOWER_HYPERBOLOID
public static final int LOWER_HYPERBOLOID
- See Also:
- Constant Field Values
-
MOEBIUS_STRIP
public static final int MOEBIUS_STRIP
- See Also:
- Constant Field Values
-
OUTER_HYPERBOLOID
public static final int OUTER_HYPERBOLOID
- See Also:
- Constant Field Values
-
PSEUDOSPHERE
public static final int PSEUDOSPHERE
- See Also:
- Constant Field Values
-
SIEVERT
public static final int SIEVERT
- See Also:
- Constant Field Values
-
SPHERE
public static final int SPHERE
- See Also:
- Constant Field Values
-
STEREOGRAPHIC_SPHERE
public static final int STEREOGRAPHIC_SPHERE
- See Also:
- Constant Field Values
-
TANNERY
public static final int TANNERY
- See Also:
- Constant Field Values
-
TORUS
public static final int TORUS
- See Also:
- Constant Field Values
-
UPPER_HYPERBOLOID
public static final int UPPER_HYPERBOLOID
- See Also:
- Constant Field Values
-
ZOLL
public static final int ZOLL
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init()
Description copied from class:PgDomainDescrInitialize and reset data structure and all instance variables.- Overrides:
initin classPgDomainDescr
-
clone
public java.lang.Object clone()
Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners. The parent relationship is maintained only within this class but not to external classes. In general, all links of the clone to external objects are set tonull.- Overrides:
clonein classPgDomainDescr- Since:
- JavaView 2.89.000
- See Also:
copy(PsObject)- Version:
- 30.07.03, 1.00 created (kp)
-
copy
public void copy(PsObject object)
Copy instance variables by duplication, not by copying a reference.The argument was changed from PgGeometry to PsObject since there were problems in J/Link which preferred to use jv.object.PsObject#copy(PsObject) instead of jv.project.PgGeometry#copy(PsObject).
- Overrides:
copyin classPgDomainDescr- Since:
- JavaView 2.89.000
- See Also:
clone()- Version:
- 30.07.03, 1.00 created (kp)
-
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 expressions 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()
Determine if surface is periodic in u-direction. This method returns false, but will be overwritten by surface which are periodic.
-
isVPeriodic
public boolean isVPeriodic()
Determine if surface is periodic in v-direction. This method returns false, but will be overwritten by surface which are periodic.
-
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.- Specified by:
updatein interfacePsUpdateIf- Overrides:
updatein classPgDomainDescr- Parameters:
event- carries a lot of information- Returns:
- true if event has been handled, otherwise false
- 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. UsegetParameter(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. UseaddParameter(PsObject)to store function parameter.- See Also:
addParameter(PsObject)
-
getParameters
public java.util.Enumeration getParameters()
Return stored function parameters as PuDouble or PuInteger objects. UseaddParameter(PsObject)to store function parameter.- See Also:
addParameter(PsObject)
-
calc_f
public boolean calc_f(PdVector f, double u, double v)
Internal function called by eval(..) to compute function value. It is ensured by the calling eval() function that argument vector exists and has correct size.If function set flag
m_bUseFunctionExpression==falsethen we use this indicator that function has not been overridden and use the string functions.This function must be overwritten by subclasses to compute surfaces, for example, if a subclass wants to perform the function calculation itself.
- Parameters:
f- vector where to place the function values.- Returns:
trueif function has been overridden and evaluated successfully.- See Also:
eval(PdVector, double, double)- Author:
- Konrad Polthier
- Version:
- 25.08.03, 1.10 revised (kp) Made public to avoid javadoc warnings.
00.00.97, 1.00 created (kp)
-
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.- Version:
- 04.07.99, 1.01 revised (kp) Evaluation of function strings included.
-
df_dU
public final PdVector df_dU(double u, double v)
Buffered versions, used by all other classes, should not be overwritten.
-
df_dV
public final PdVector df_dV(double u, double v)
-
df
public final PdMatrix df(double u, double v)
-
ddf_dUdU
public final PdVector ddf_dUdU(double u, double v)
-
ddf_dUdV
public final PdVector ddf_dUdV(double u, double v)
-
ddf_dVdV
public final PdVector ddf_dVdV(double u, double v)
-
normal
public final PdVector normal(double u, double v)
-
dN_dU
public final PdVector dN_dU(double u, double v)
-
dN_dV
public final PdVector dN_dV(double u, double v)
-
dN
public final PdMatrix dN(double u, double v)
-
firstFundamental
public final PdMatrix firstFundamental(double u, double v)
-
secondFundamental
public final PdMatrix secondFundamental(double u, double v)
-
weingarten
public final PdMatrix weingarten(double u, double v)
-
christoffel
public final PdMatrix[] christoffel(double u, double v)
-
-
"