JavaView® v2.00.008

jvx.geom
Class PwCurvature

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

public class PwCurvature
extends PsObject

Compute various discrete curvature terms of a polyhedral surface.

Version:
24.06.98, 1.01 revised (kp) Moved from PgElementSet in separate class.
01.06.98, 1.00 created (kp)
Author:
Konrad Polthier
See Also:
PgElementSet, Serialized Form

Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS
 
Constructor Summary
PwCurvature()
           
 
Method Summary
static double getGaussCurvature(PgElementSet geom, int aVertexInd)
          Get Gauss curvature at vertex with given index.
static double getGaussCurvature(PgElementSet geom, PdVector gauss)
          Compute discrete Gauss curvature at all vertices, and return total interior Gauss curvature.
static boolean getMeanCurvature(PgElementSet geom)
          Compute vertex normals as mean curvature vectors and set enable showing of vertex normals.
static PdVector getMeanCurvature(PgElementSet geom, PdVector mean)
          Careful: If array 'mean' is too small then a new array with correct size is created, i.e. the array is not expanded.
static PdVector[] getMeanCurvature(PgElementSet geom, PdVector[] meanVec)
          Compute discrete mean curvature at all vertices.
static boolean getPrincipalCurvature(PgElementSet geom)
          Compute vertex normals as mean curvature vectors and set enable showing of vertex normals
static PdVector[][] getPrincipalCurvature(PgElementSet geom, PdVector[][] vec)
          Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form.
static boolean getPrincipalCurvatureAngle(PgElementSet geom)
          Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form.
static PdVector[][] getPrincipalCurvatureAngle(PgElementSet geom, PdVector[][] vec)
          Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form.
static boolean getPrincipalCurvatureArea(PgElementSet geom)
          Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form.
static PdVector[][] getPrincipalCurvatureArea(PgElementSet geom, PdVector[][] vec)
          Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form.
static void showGaussCurvature(PgElementSet geom)
          Show discrete Gauss curvature at all vertices and elements.
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, init, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, update, updatePanels
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PwCurvature

public PwCurvature()
Method Detail

showGaussCurvature

public static void showGaussCurvature(PgElementSet geom)
Show discrete Gauss curvature at all vertices and elements. Method calls #getGaussCurvature(PgElementSet,PdVector).

getGaussCurvature

public static double getGaussCurvature(PgElementSet geom,
                                       int aVertexInd)
Get Gauss curvature at vertex with given index. HACK: Method is not implemented yet.

getGaussCurvature

public static double getGaussCurvature(PgElementSet geom,
                                       PdVector gauss)
Compute discrete Gauss curvature at all vertices, and return total interior Gauss curvature. If argument array is null or wrong size, it is created or its length is adjusted. Curvature is computed only for vertices which are referenced by elements. If a vertex is not reference, then its curvature value is 0. Curvature of boundary vertices is defined 0, therefore method requires a correct neighbour structure.

Note, polygonal faces with m>3 vertices are triangulated on the fly by cutting off the vertex with smallest vertex angle successively. This tries to ensure that the Gauss curvature is independent of the numbering of vertices inside an element, as it would depend on if we would use subtriangles {v[0],v[j],v[j+1]}.

If geometry has elements with more than three edges then we need the element normals for triangulating those elements. If the element normals do not exist in such a case, then we generate them using makeElementNormals().

Returns:
total Gauss curvature

getMeanCurvature

public static PdVector[] getMeanCurvature(PgElementSet geom,
                                          PdVector[] meanVec)
Compute discrete mean curvature at all vertices. If argument array is null or wrong size, it is created or its length is adjusted. Curvature is computed only for vertices which are referenced by elements. If a vertex is not reference, then its curvature value is 0. Curvature of boundary vertices is defined 0, therefore method requires correct neighbour structure.

getMeanCurvature

public static boolean getMeanCurvature(PgElementSet geom)
Compute vertex normals as mean curvature vectors and set enable showing of vertex normals.

getMeanCurvature

public static PdVector getMeanCurvature(PgElementSet geom,
                                        PdVector mean)
Careful: If array 'mean' is too small then a new array with correct size is created, i.e. the array is not expanded. Method requires existence of correct vertex normals to compute the sign.

getPrincipalCurvature

public static boolean getPrincipalCurvature(PgElementSet geom)
Compute vertex normals as mean curvature vectors and set enable showing of vertex normals

getPrincipalCurvatureArea

public static boolean getPrincipalCurvatureArea(PgElementSet geom)
Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form. This method uses weighting of according to the area of adjacent elements.

getPrincipalCurvatureAngle

public static boolean getPrincipalCurvatureAngle(PgElementSet geom)
Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form. This method uses weighting of according to the Angle of adjacent elements.

getPrincipalCurvature

public static PdVector[][] getPrincipalCurvature(PgElementSet geom,
                                                 PdVector[][] vec)
Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form. This method does not use any weighting.

getPrincipalCurvatureArea

public static PdVector[][] getPrincipalCurvatureArea(PgElementSet geom,
                                                     PdVector[][] vec)
Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form. This method uses weighting of according to the area of adjacent elements.

getPrincipalCurvatureAngle

public static PdVector[][] getPrincipalCurvatureAngle(PgElementSet geom,
                                                      PdVector[][] vec)
Compute principal curvature directions and values as eigenvectors and eigenvalues from a quadratic form. This method uses weighting of according to the angle of adjacent elements.

JavaView® v2.00.008

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