Class PwCurvature
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.geom.PwCurvature
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf
public class PwCurvature extends PsObject
Compute various discrete curvature terms of a polyhedral surface.- See Also:
PgElementSet, Serialized Form- Author:
- Konrad Polthier
- Version:
- 02.12.09, 2.10 revised (fk) add
getGaussCurvature(PgElementSet, int, int).
10.05.04, 2.00 revised (kh) Computation of Shape operator and principal curvatures added.
24.06.98, 1.01 revised (kp) Moved from PgElementSet in separate class.
01.06.98, 1.00 created (kp)
-
-
Field Summary
-
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 PwCurvature()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doublegetGaussCurvature(PgElementSet geom, int vertexInd, int elemInd)Compute discrete Gauss curvature at a vertex.static doublegetGaussCurvature(PgElementSet geom, PdVector gauss)Compute discrete Gauss curvature at all vertices, and return total interior Gauss curvature.static booleangetMeanCurvature(PgElementSet geom)Compute and assign vertex normals as mean curvature vectors.static PdVectorgetMeanCurvature(PgElementSet geom, PdVector mean)Compute the mean curvature at all vertices.static PdVector[]getMeanCurvature(PgElementSet geom, PdVector[] meanVec)Compute discrete mean curvature at all vertices.static voidgetPrincipalCurvatures(PgElementSet geom)Computes the principal curvatures and directions at each vertex of the surface and add two vector fields to the surface.static voidgetPrincipalCurvatures(PgElementSet geom, boolean divideByAreaOfStar)Computes the principal curvatures and directions at each vertex of the surface and add two vector fields to the surface.static voidgetPrincipalCurvatures(PgElementSet geom, PdMatrix[] shape, PdVector[] pcValues, PdVector[][] pcDirections)Computes the principal curvatures and directions at each vertex of the surface.static voidgetPrincipalCurvatures(PgElementSet geom, PdMatrix[] shape, PdVector[] pcValues, PdVector[][] pcDirections, boolean orderByAbsVal)Computes the principal curvatures and directions at each vertex of the surface.static voidgetPrincipalCurvatures(PgElementSet geom, PdVector[] pcValues, PdVector[][] pcDirections)Computes the principal curvatures and directions at each vertex of the surface.static PdMatrix[]getShapeOperator(PgElementSet geom, double d)static PdMatrix[]getShapeOperator(PgElementSet geom, PdMatrix[] shape)Computes the shape operator at each vertex of the surface, represented as a (d,d) matrix where d is the dimension of the ambient space.static PdMatrix[]getShapeOperator(PgElementSet geom, PdMatrix[] shape, boolean projectToTangentPlane)Computes the shape operator at each vertex of the surface, represented as a (d,d) matrix where d is the dimension of the ambient space.static voidmakeColorFromGaussCurvature(PgElementSet geom)Show discrete Gauss curvature at all vertices and elements.-
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, init, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, update, updatePanels
-
-
-
-
Method Detail
-
makeColorFromGaussCurvature
public static void makeColorFromGaussCurvature(PgElementSet geom)
Show discrete Gauss curvature at all vertices and elements. Method callsgetGaussCurvature(PgElementSet,PdVector).- Author:
- Konrad Polthier
- Version:
- 24.06.98, 1.01 revised (kp) Moved from PgElementSet in separate class.
01.06.98, 1.00 created (kp)
-
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 referenced, 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>3vertices 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]}.- Returns:
- total Gauss curvature
- See Also:
getGaussCurvature(PgElementSet, int, int)- Author:
- Konrad Polthier
- Version:
- 27.11.04, 1.20 revised (kp) Initialization of parameter gauss.
12.02.01, 1.10 revised (kp) Remove usage of normal vectors used in PgUtil.triangulate.
24.06.98, 1.01 revised (kp) Moved from PgElementSet in separate class.
01.06.98, 1.00 created (kp)
-
getGaussCurvature
public static double getGaussCurvature(PgElementSet geom, int vertexInd, int elemInd)
Compute discrete Gauss curvature at a vertex. Curvature is computed only for vertices which are referenced by elements. If a vertex is not referenced, then its curvature value is 0. Curvature of boundary vertices is defined 0. The method requires a correct neighbor structure.Note, polygonal faces with more than tree 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]}.
- Parameters:
geom- A PgElementSetvertexInd- The index of a vertex in the element set.elemInd- Index of element which references the vertex, might be -1.- Returns:
- Gauss curvature at the specified vertex.
- See Also:
getGaussCurvature(PgElementSet, PdVector)- Author:
- Felix Kälberer
- Version:
- 02.12.09, 1.00 created (fk)
-
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.- Returns:
- array of mean curvature vectors, one vector per vertex
- Author:
- Konrad Polthier
- Version:
- 24.06.98, 1.01 revised (kp) Moved from PgElementSet in separate class.
01.06.98, 1.00 created (kp)
-
getMeanCurvature
public static boolean getMeanCurvature(PgElementSet geom)
Compute and assign vertex normals as mean curvature vectors. Showing of vertex normals must be enabled elsewhere.- Returns:
trueon success.- Author:
- Konrad Polthier
- Version:
- 26.06.01, 1.10 revised (kp) No longer enable showing of vertex normals in this method.
24.06.98, 1.01 revised (kp) Moved from PgElementSet in separate class.
01.06.98, 1.00 created (kp)
-
getMeanCurvature
public static PdVector getMeanCurvature(PgElementSet geom, PdVector mean)
Compute the mean curvature at all vertices.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. Mean curvature is negative of mean curvature vector has negative scalar product with vertex normal.
- Returns:
- vector with a scalar mean curvature value per vertex
- Author:
- Konrad Polthier
- Version:
- 24.06.98, 1.01 revised (kp) Moved from PgElementSet in separate class.
01.06.98, 1.00 created (kp)
-
getShapeOperator
public static PdMatrix[] getShapeOperator(PgElementSet geom, PdMatrix[] shape)
Computes the shape operator at each vertex of the surface, represented as a (d,d) matrix where d is the dimension of the ambient space. The operator is an integrated quantity, the matrix at each vertex represents an integral of the shape operator over the star of the vertex. To get a piecewise linear shape operator usePnMassMatrix.multInvMassMatrix(PgElementSet, PdMatrix[], boolean).- Author:
- Klaus Hildebrandt
- Version:
- 10.05.04, 1.00 created (kh)
-
getShapeOperator
public static PdMatrix[] getShapeOperator(PgElementSet geom, PdMatrix[] shape, boolean projectToTangentPlane)
Computes the shape operator at each vertex of the surface, represented as a (d,d) matrix where d is the dimension of the ambient space. The operator is an integrated quantity, the matrix at each vertex represents an integral of the shape operator over the star of the vertex. To get a piecewise linear shape operator usePnMassMatrix.multInvMassMatrix(PgElementSet, PdMatrix[], boolean). If the projection is enabled each matrix is transformed such that the trace of the matrix is preserved and<n,Sn> = 0is valid, where n is the vertex normal.- Author:
- Klaus Hildebrandt
- Version:
- 03.01.17, 1.10 revised (ur) Bugfix: Instead of assureElementNormals, compute normals if they are missing.(ur) 10.05.04, 1.00 created (kh)
-
getShapeOperator
public static PdMatrix[] getShapeOperator(PgElementSet geom, double d)
-
getPrincipalCurvatures
public static void getPrincipalCurvatures(PgElementSet geom, PdVector[] pcValues, PdVector[][] pcDirections)
Computes the principal curvatures and directions at each vertex of the surface. The curvatures are integrated quantities. To get a piecewise linear shape operator usePnMassMatrix.multInvMassMatrix(PgElementSet, PdMatrix[], boolean). If only the only the direction or the values are needed, the other argument can be null.- Parameters:
geom- geometry to operate on.pcValues- array with length 2 and vector length equal to the number of vertices.pcDirections- array with length [2][nov] where nov is the number of vertices. Each vector must have dimension equal to the dimension of the ambient space.- Author:
- Klaus Hildebrandt
- Version:
- 10.05.04, 1.00 created (kh)
-
getPrincipalCurvatures
public static void getPrincipalCurvatures(PgElementSet geom)
Computes the principal curvatures and directions at each vertex of the surface and add two vector fields to the surface. Each vector has the points into a principal curvature direction and has length according to the absolute of the principal curvature value. The principal curvatures at a vertex represents an integral over the star of a vertex. This means the value at the vertex depends on the size of the star of the vertex. To get principal curvatures that independent of the size of the star usegetPrincipalCurvatures(PgElementSet, boolean). }.- Author:
- Klaus Hildebrandt
- Version:
- 10.05.04, 1.00 created (kh)
-
getPrincipalCurvatures
public static void getPrincipalCurvatures(PgElementSet geom, boolean divideByAreaOfStar)
Computes the principal curvatures and directions at each vertex of the surface and add two vector fields to the surface. Each vector has the points into a principal curvature direction and has length according to the absolute of the principal curvature value. The principal curvatures at a vertex represents an integral over the star of a vertex. This means the value at the vertex depends on the size of the star of the vertex. To get principal curvatures that independent of the size of the star set the argument divideByAreaOfStar = true.- Author:
- Klaus Hildebrandt
- Version:
- 25.10.04, 1.00 created (kh)
-
getPrincipalCurvatures
public static void getPrincipalCurvatures(PgElementSet geom, PdMatrix[] shape, PdVector[] pcValues, PdVector[][] pcDirections)
Computes the principal curvatures and directions at each vertex of the surface. The curvatures are integrated quantities. To get a piecewise linear shape operator usePnMassMatrix.multInvMassMatrix(PgElementSet, PdMatrix[], boolean). If only the only the direction or the values are needed, the other argument can be null.- Parameters:
geom- geometry to operate on.pcValues- array with length 2 and vector length equal to the number of vertices.pcDirections- array with length [2][nov] where nov is the number of vertices. Each vector must have dimension equal to the dimension of the ambient space.shape- array of length equal to the number of vertices of the geometry. This argument can optionally be null.- Author:
- Klaus Hildebrandt
- Version:
- 10.05.04, 1.00 created (kh)
-
getPrincipalCurvatures
public static void getPrincipalCurvatures(PgElementSet geom, PdMatrix[] shape, PdVector[] pcValues, PdVector[][] pcDirections, boolean orderByAbsVal)
Computes the principal curvatures and directions at each vertex of the surface. The curvatures are integrated quantities. To get a piecewise linear shape operator usePnMassMatrix.multInvMassMatrix(PgElementSet, PdMatrix[], boolean). If only the only the direction or the values are needed, the other argument can be null.- Parameters:
geom- geometry to operate on.pcValues- array with length 2 and vector length equal to the number of vertices.pcDirections- array with length [2][nov] where nov is the number of vertices. Each vector must have dimension equal to the dimension of the ambient space.shape- array of length equal to the number of vertices of the geometry. This argument can optionally be null.orderByAbsVal- true - principal curvature are ordered by their absolute value.- Author:
- Klaus Hildebrandt
- Version:
- 10.05.04, 1.00 created (kh)
-
-
"