JavaView® v2.12

jvx.geom
Class PwIntegralLines

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jvx.geom.PwIntegralLines
All Implemented Interfaces:
java.lang.Cloneable, PsUpdateIf, java.io.Serializable

public class PwIntegralLines
extends PsObject

Compute a whole set of integral lines of a given vector field on a triangulated surface for visualization purposes.

Assign a surface by setGeometry(PgElementSet) and a display where the calculated integral lines will show up by setDisplay(PvDisplayIf) (if you wish that behaviour) and compute the integral lines (makeIntegralLines()). Various parameters may be configured.

Use method getInfoPanel() to get a control panel for parameters step size, number of steps and index of vector field.

Of course you may also use the static method that computes the integral lines direcly (makeIntegralLines(PgElementSet,PgVectorField,PgPolygonSet,double,int).

Version:
07.05.01, 1.00 created,revised (ep)
Author:
Eike Preuss
See Also:
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
PwIntegralLines()
           
 
Method Summary
 void close()
          Call this method to shutdown the workshop.
 PvDisplayIf getDisplay()
          Get the display where computed integral lines will show up when using the workshop's info panel or method makeIntegralLines().
 PgElementSet getGeometry()
          Get the geometry that will be used for integration when using the workshop's info panel or method makeIntegralLines().
 PgPolygonSet getIntegralLines()
          Get the polygon set instance which is updated by method makeIntegralLines.
 int getNumSteps()
          Get the number of steps that will be used for integration in makeIntegralLines.
 double getStepSize()
          Get step size used for integration in makeIntegralLines.
 int getVectorFieldIndex()
          Get index of the vector field that will be integrated when using makeIntegralLines().
 void init()
          Initializes by setting all parameters to initial values and removing computed integral lines.
 void makeIntegralLines()
          Compute a set of integral lines, each beginning at the center of an element.
static PgPolygonSet makeIntegralLines(PgElementSet geom, PgVectorField vec, PgPolygonSet out, double stepsize, int numSteps)
          Static method that computes a set of integral lines on the given geometry of the given vector field.
 void removeIntegralLines()
          Removes previously computed set of integral lines from the display and internal uses.
 void setDisplay(PvDisplayIf disp)
          Set the display where computed integral lines will show up when using the workshop's info panel or method makeIntegralLines().
 void setGeometry(PgElementSet geom)
          Set the geometry that will be used for integration when using the workshop's info panel or method makeIntegralLines().
 void setNumSteps(int num)
          Set the number of steps that will be used for integration in makeIntegralLines.
 void setStepSize(double step)
          Set the step size used for integration in makeIntegralLines.
 void setVectorFieldIndex(int vfIndex)
          Set the vector field that will be integrated by index in the element set as set by setGeometry(PgElementSet), beginning with index 0.
 boolean update(java.lang.Object source)
          Update all inspector panels, send update to all registered update listeners and finally update parent.
 
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

PwIntegralLines

public PwIntegralLines()
Method Detail

init

public void init()
Initializes by setting all parameters to initial values and removing computed integral lines. Does not remove the settings for geometry and display!
Overrides:
init in class PsObject

setGeometry

public void setGeometry(PgElementSet geom)
Set the geometry that will be used for integration when using the workshop's info panel or method makeIntegralLines(). This geometry must be a triangulation!

A second call of the method will remove the previous setting. The workshop will register as an update listener to the given geometry to be informed about the number of vector fields on it.

Parameters:
geom - triangulated surface with vector field(s)
See Also:
getGeometry()

getGeometry

public PgElementSet getGeometry()
Get the geometry that will be used for integration when using the workshop's info panel or method makeIntegralLines().
See Also:
setGeometry(PgElementSet)

setDisplay

public void setDisplay(PvDisplayIf disp)
Set the display where computed integral lines will show up when using the workshop's info panel or method makeIntegralLines(). If called with null as argument this method will remove the display settings.

A second call of the method will remove the previous setting.

Parameters:
disp - display that will be used to present the results, may be null

getDisplay

public PvDisplayIf getDisplay()
Get the display where computed integral lines will show up when using the workshop's info panel or method makeIntegralLines().
See Also:
setDisplay(PvDisplayIf)

update

public boolean update(java.lang.Object source)
Description copied from class: PsObject
Update all inspector panels, send update to all registered update listeners and finally update parent. Each of those updates has this object as event independent of the argument of this method.

Central update method of this object. Must be overwritten if this class receives unknown events, say, from new children. Any subclass must class invoke super.update(event) on all events it does handle itself.

Overrides:
update in class PsObject
Following copied from class: jv.object.PsObject
See Also:
PsObject.setParent(PsUpdateIf), PsObject.getFather(), PsObject.addUpdateListener(PsUpdateIf)

setStepSize

public void setStepSize(double step)
Set the step size used for integration in makeIntegralLines.
Parameters:
step - positive step size
See Also:
getStepSize(), setNumSteps(int)

getStepSize

public double getStepSize()
Get step size used for integration in makeIntegralLines.
Returns:
positive step size
See Also:
setStepSize(double), getNumSteps()

setNumSteps

public void setNumSteps(int num)
Set the number of steps that will be used for integration in makeIntegralLines.
Parameters:
num - number of integration steps
See Also:
getNumSteps(), setStepSize(double)

getNumSteps

public int getNumSteps()
Get the number of steps that will be used for integration in makeIntegralLines.
See Also:
setNumSteps(int), getStepSize()

setVectorFieldIndex

public void setVectorFieldIndex(int vfIndex)
Set the vector field that will be integrated by index in the element set as set by setGeometry(PgElementSet), beginning with index 0.
Parameters:
vfIndex - index of vector field that shall be visualized 0,...
See Also:
getVectorFieldIndex(), setGeometry(PgElementSet)

getVectorFieldIndex

public int getVectorFieldIndex()
Get index of the vector field that will be integrated when using makeIntegralLines().
See Also:
setVectorFieldIndex(int)

makeIntegralLines

public void makeIntegralLines()
Compute a set of integral lines, each beginning at the center of an element. This method uses the parameters that can be adjusted by the set/get-methods. The resulting polygon set is shown in the display that was set by setDisplay(PvDisplayIf). You can get the computed polygon set by method getIntegralLines().
See Also:
setGeometry(PgElementSet), setDisplay(PvDisplayIf), setStepSize(double), setNumSteps(int), setVectorFieldIndex(int), getIntegralLines(), makeIntegralLines(PgElementSet, PgVectorField, PgPolygonSet, double, int)

getIntegralLines

public PgPolygonSet getIntegralLines()
Get the polygon set instance which is updated by method makeIntegralLines.
Returns:
the polygon set that is updated at each computation
See Also:
makeIntegralLines()

removeIntegralLines

public void removeIntegralLines()
Removes previously computed set of integral lines from the display and internal uses. Next call of makeIntegralLines() will create a new polygon set, the old polygon set will not be updated with further results but the new one will. This new polygon set will be returned by method getIntegralLines().
See Also:
getIntegralLines()

close

public void close()
Call this method to shutdown the workshop. Removes the workshop from the list of update listeners of the geometry.

makeIntegralLines

public static PgPolygonSet makeIntegralLines(PgElementSet geom,
                                             PgVectorField vec,
                                             PgPolygonSet out,
                                             double stepsize,
                                             int numSteps)
Static method that computes a set of integral lines on the given geometry of the given vector field. From the center of each element emerges one integral line that is integrated numerically with given step size and number of iterations.
Parameters:
geom - the surface, MUST be triangulation!
vec - vector field on surface geom.
out - if not equal null, results are written here.
stepsize - used for integration of each integral line.
numSteps - used for integration of each integral line.
Returns:
parameter out if it is not null, otherwise a new polygon set that contains the results.
See Also:
PnGeodesicRK, PgPolygonOnElementSet

JavaView® v2.12

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