vgp.vector.rungeKutta

## Class PjRungeKutta

- java.lang.Object
- - jv.object.PsObject
  - - jv.project.PjProject
    - - vgp.vector.rungeKutta.PjRungeKutta

- All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, java.util.EventListener, PsTimeListenerIf, PsUpdateIf, PvPickListenerIf

      public class PjRungeKutta
      extends PjProject
      implements java.lang.Runnable, java.awt.event.ActionListener

  Project demonstrates geodesic Runge-Kutta integration of vector fields on surfaces and the line integral convolution method. The vector field is randomly generated on loaded geometries.
  See Also:
    `PnLIC`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `GEODESIC` Geodesic completion.
    `static int` | `GEODESIC2` Geodesic translation along half angle.
    `static int` | `GEODESIC3` Geodesic translation dependent on evaluation point (continuous).
    `static int` | `PROJECTION` Is used by method calculateRepresentations.

    - ### 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
    `PjRungeKutta()` If (this.instanceOf("PjRungeKutta")) it calls init-method.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(java.awt.event.ActionEvent event)` Starts a new thread that calculates the LIC texture.
    `void` | `calculateRepresentations()` Calculates the representations of vectors at every vertex star.
    `void` | `computeIntegralCurve(int elemInd, PdBary bary, double length, int discr)` Computes the integral curve with initial values internally given.
    `void` | `computeRandomVectorField()` Calculates (pseudo) random vector field.
    `java.lang.String` | `getFileName()` Get current file name.
    `double` | `getTime()` Return running time of latest Lic calculation in milliseconds.
    `void` | `init()` Initialize and reset project, stops the running animation if any.
    `boolean` | `isEnabledFast()` Sets integration method to euler-mode or 4th-order Runge-Kutta mode.
    `boolean` | `isRunning()` Check if lic computation is currently running.
    `boolean` | `load()` Loads geometry via PjImportModel and then calls load().
    `void` | `pickInitial(PvPickEvent pos)` Initiates calculation of an integral line that starts at picked position.
    `void` | `run()` Gets an appropriate Runge-Kutta class and initiates LIC calculation element by element.
    `void` | `setEnabledFast(boolean flag)` Sets integration method to Euler-mode or 4th-order Runge-Kutta mode.
    `void` | `setFileName(java.lang.String fullFileName)` Sets filename from outside of this project.
    `boolean` | `setGeometry(PgElementSet geom)` Sets the geometry loaded from PjImportModel and then triangulates, updates the number of elements, gets a vector field and fits that all in the display.
    `void` | `setMethod(int method)` Set integration method used in calculateRepresentations.
    `void` | `start()` Start project with loading geometry from file.
    `void` | `startLIC()` Start computation of lic image.
    `void` | `stopLIC()` Stop computation of lic image.
    `boolean` | `update(java.lang.Object event)` Perform update handling when dependent objects change.

    - ### Methods inherited from class jv.project.PjProject

      `addDisplay, addGeometry, addGeometry, dispose, dragDisplay, dragInitial, dragVertex, fitDisplays, getAnimation, getDisplay, getDisplays, getGeometry, getGeometry, getNumGeometries, getParameter, getViewer, hasAnimation, hasDisplay, isEnabledAutoFit, markVertices, pickDisplay, pickVertex, removeDisplay, removeGeometries, removeGeometry, selectDisplay, selectGeometry, setAnimation, setBackColor, setBorderType, setDisplay, setEnabledAutoFit, setGeometry, setParameter, setTime, setViewer, stop, unmarkVertices`

    - ### Methods inherited from class jv.object.PsObject

      `addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jv.anim.PsTimeListenerIf

      `getName`

    - ### Methods inherited from interface jv.project.PvPickListenerIf

      `getName`

- - ### Field Detail

    - #### PROJECTION

          public static final int PROJECTION

      Is used by method calculateRepresentations.
      See Also:
        Constant Field Values

    - #### GEODESIC

          public static final int GEODESIC

      Geodesic completion. Is used by method calculateRepresentations.
      See Also:
        Constant Field Values

    - #### GEODESIC2

          public static final int GEODESIC2

      Geodesic translation along half angle. Is used by method calculateRepresentations.
      See Also:
        Constant Field Values

    - #### GEODESIC3

          public static final int GEODESIC3

      Geodesic translation dependent on evaluation point (continuous). Is used by method calculateRepresentations.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PjRungeKutta

          public PjRungeKutta()

      If (this.instanceOf("PjRungeKutta")) it calls init-method.

  - ### Method Detail

    - #### init

          public void init()

      Description copied from class: `PjProject`
      Initialize and reset project, stops the running animation if any. Does not reset any registered display nor geometry. They must be reset individually in each subclass.
      Overrides:
        `init` in class `PjProject`

    - #### start

          public void start()

      Start project with loading geometry from file.
      Overrides:
        `start` in class `PjProject`
      See Also:
        `PvViewerIf.start()`, `PjProject.isEnabledAutoFit()`

    - #### update

          public boolean update(java.lang.Object event)

      Perform update handling when dependent objects change.
      Specified by:
        `update` in interface `PsUpdateIf`
      Overrides:
        `update` in class `PsObject`
      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)`

    - #### getFileName

          public java.lang.String getFileName()

      Get current file name.

    - #### setFileName

          public void setFileName(java.lang.String fullFileName)

      Sets filename from outside of this project. Replaces the default file name. Must call load() after setting the file name.
      Parameters:
        `fullFileName` - fully specified file name including code base, or URL.
      See Also:
        `load()`

    - #### actionPerformed

          public void actionPerformed(java.awt.event.ActionEvent event)

      Starts a new thread that calculates the LIC texture.
      Specified by:
        `actionPerformed` in interface `java.awt.event.ActionListener`
      See Also:
        `run()`

    - #### load

          public boolean load()

      Loads geometry via PjImportModel and then calls load().
      See Also:
        `setGeometry(PgElementSet)`

    - #### setGeometry

          public boolean setGeometry(PgElementSet geom)

      Sets the geometry loaded from PjImportModel and then triangulates, updates the number of elements, gets a vector field and fits that all in the display.

      Lic computation must be stopped before loading a new geometry.

    - #### setMethod

          public void setMethod(int method)

      Set integration method used in calculateRepresentations.
      See Also:
        `PROJECTION`, `GEODESIC`, `GEODESIC2`, `GEODESIC3`

    - #### pickInitial

          public void pickInitial(PvPickEvent pos)

      Initiates calculation of an integral line that starts at picked position.
      Specified by:
        `pickInitial` in interface `PvPickListenerIf`
      Overrides:
        `pickInitial` in class `PjProject`
      Parameters:
        `pos` - Pick event issued by the display
      See Also:
        `computeIntegralCurve(int, jv.vecmath.PdBary, double, int)`

    - #### isEnabledFast

          public boolean isEnabledFast()

      Sets integration method to euler-mode or 4th-order Runge-Kutta mode.
      Returns:
        true: euler; false: 4th-order runge-kutta

    - #### setEnabledFast

          public void setEnabledFast(boolean flag)

      Sets integration method to Euler-mode or 4th-order Runge-Kutta mode.
      Parameters:
        `flag` - true: Euler; false: 4th-order Runge-Kutta

    - #### getTime

          public double getTime()

      Return running time of latest Lic calculation in milliseconds.

    - #### isRunning

          public boolean isRunning()

      Check if lic computation is currently running.

    - #### startLIC

          public void startLIC()

      Start computation of lic image.

    - #### stopLIC

          public void stopLIC()

      Stop computation of lic image.

    - #### run

          public void run()

      Gets an appropriate Runge-Kutta class and initiates LIC calculation element by element.
      Specified by:
        `run` in interface `java.lang.Runnable`
      See Also:
        `PnLIC`, `PnVertexRK`, `PnTranslationRK`

    - #### computeRandomVectorField

          public void computeRandomVectorField()

      Calculates (pseudo) random vector field.

    - #### calculateRepresentations

          public void calculateRepresentations()

      Calculates the representations of vectors at every vertex star. If current method in m_method is GEODESIC3,i.e. continuous geodesic translation, this calculation is done in the runge-kutta class.
      See Also:
        `PnTranslationRK`, `PwBary.getGeodRepresentation(jv.geom.PgElementSet, int, jv.vecmath.PdBaryDir, int, jv.vecmath.PiVector, jv.vecmath.PiVector)`, `PwBary.getTransRepresentation(jv.geom.PgElementSet, int, jv.vecmath.PdBaryDir, int, jv.vecmath.PiVector, jv.vecmath.PiVector)`, `PwBary.getProjRepresentation(jv.geom.PgElementSet, int, jv.vecmath.PdBaryDir, int, jv.vecmath.PiVector, jv.vecmath.PiVector)`

    - #### computeIntegralCurve

          public void computeIntegralCurve(int elemInd,
                                  PdBary bary,
                                  double length,
                                  int discr)

      Computes the integral curve with initial values internally given.

"

The software JavaView? is copyright protected. All Rights Reserved.
"