Documentation of 'jvx.geom.PwShapeOperator' Java class
PwShapeOperator ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.geom

Class PwShapeOperator

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PjWorkshopIf


    public class PwShapeOperator
    extends PjWorkshop
    Provides methods for calculating the discrete shape operator for a PgElementSet.
    See Also:
    Serialized Form
    Author:
    Philip Hornig
    Version:
    20.02.2009, 1.32 revised (fk) Turn off convolution mask.
    23.10.2008, 1.31 revised (fk) Display progress in the status bar.
    22.10.2008, 1.30 revised (fk) Add possibility to use absolute curvature values.
    10.09.2008, 1.20 revised (fk) Simplified a lot. Now 2x-3x faster.
    09.05.2007, 1.10 revised (fk) Simplified orientation check. Add convolutionMask function.
    06.12.2006, 1.00 created (ph)
    • Field Detail

      • m_useConvolutionMask

        public static boolean m_useConvolutionMask
        This flag specifies if all edges will be weighted equally or if edges that are closer to the center of the ball get higher weight. At least on tubular surfaces the convolution mask yield much worse results, so I turned the mask off again (which is also in line with Morvan et al.). A stencil which assigns smaller weights to outer edges also has to visit more edges to have the same "average distance of an edge" than an unweighted scheme. Therefore, the radius can be chosen smaller when the convolution mask is off, which is much faster. (fk)
    • Constructor Detail

      • PwShapeOperator

        public PwShapeOperator()
        Default constructor
    • Method Detail

      • isEnabledConvolution

        public static boolean isEnabledConvolution()
        Check if convolution with a weighting mask is enabled.
        Author:
        Felix Kaelberer
        Version:
        23.10.2008, 1.00 created (fk)
      • enableConvolution

        public static void enableConvolution(boolean useConvolution)
        Use a weighting mask.
        Author:
        Felix Kaelberer
        Version:
        23.10.2008, 1.00 created (fk)
      • isEnabledAbsoluteValue

        public static boolean isEnabledAbsoluteValue()
        Check if absolute curvature values are used for curvature tensor calculation.
        Author:
        Felix Kaelberer
        Version:
        23.10.2008, 1.00 created (fk)
      • enableAbsoluteValue

        public static void enableAbsoluteValue(boolean useAbsoluteValue)
        Use absolute curvature values are used for curvature tensor calculation. This is useful if only directions of curvatures are needed.
        Author:
        Felix Kaelberer
        Version:
        23.10.2008, 1.00 created (fk)
      • getShapeOperator

        public static PdMatrix[] getShapeOperator(PgElementSet geom,
                                                  double radius,
                                                  boolean vertexBased,
                                                  PdMatrix[] shape)
        Calculate the shape operator for the whole geometry geom. The shape operator is being calculated for every vertex or every element depending on vertexBased. The shape operator is calculated over every edge within a Euclidean ball of radius radius by adding the curvature (the signed angle between face normals) weighted by the length of the edge within the ball, divided by the total area of the surface enclosed by the ball.
        Parameters:
        geom - A PgElementSet to work on.
        radius - The radius of the ball determining the edges to be included in the calculation of the shape operator.
        vertexBased - If true, calculates shape operator for every vertex, if false, calculate shape operator for every element
        shape - An PdMatrix array of length equal to the number of vertices or elements, depending on vertexBased, may be null.
        Version:
        23.10.2008, 1.10 revised (fk) Display progress in the status bar.
      • getShapeOperator

        public static PdMatrix getShapeOperator(PgElementSet geom,
                                                int vertexInd,
                                                int elemInd,
                                                double radius,
                                                PdMatrix shape)
        Calculates the shape operator for the vertex with index vertexInd of the PgElementSet geom and stores it in the PdMatrix shape. Normals of the geometry must exist.
        Parameters:
        geom - A PgElementSet of which the shape operator is to be calculated.
        vertexInd - The index of the vertex which shape operator shall be calculated.
        elemInd - Index of one element containing the vertex with index vertexInd, maybe -1, but then a linear search is required to find one.
        radius - The radius of the ball determining the edges to be included in the calculation of the shape operator of the vertex.
        shape - A possibly null reference to a PdMatrix object in which the shape operator for the vertex will be stored.
        Author:
        Philip Hornig, Felix Kaelberer
        Version:
        06.05.2008, 1.00 revised (fk) simplified, moved code to makeShapeOperator. 00.12.2006, 1.00 created (ph)
      • getShapeOperator

        public static PdMatrix getShapeOperator(PgElementSet geom,
                                                PdBary bary,
                                                double radius,
                                                PdMatrix shape)
        Calculates the shape operator for the point on the PgElementSet geom within the element with index elementInd given by the barycentric coordinates baryCoords and stores it in the PdMatrix shape.
        Parameters:
        geom - A PgElementSet of which the shape operator is to be calculated.
        bary - PdBary containing the relevant element index and barycentric coordinates of the center vertex
        radius - The radius of the ball determining the edges to be included in the calculation of the shape operator of any given vertex.
        shape - A possibly null reference to a PdMatrix object in which the shape operator for the point will be stored.
        Author:
        Philip Hornig, Felix Kaelberer
        Version:
        06.05.2008, 1.00 revised (fk) simplified, moved code to makeShapeOperator. 00.12.2006, 1.00 created (ph)
      • getShapeOperator

        public static PdMatrix getShapeOperator(PgElementSet geom,
                                                int elementInd,
                                                double radius,
                                                PdMatrix shape)
        Calculates the shape operator for the element with elementInd of the PgElementSet geom. The result will be the shape operator of the barycentric center of the element.
        Parameters:
        geom - A PgElementSet of which the shape operator is to be calculated.
        elementInd - The element containing the point of which the shape operator shall be calculated.
        radius - The radius of the ball determining the edges to be included in the calculation of the shape operator of any given vertex.
        shape - A possibly null reference to a PdMatrix object in which the shape operator for the point will be stored.
      • getPrincipalCurvatures

        public static void getPrincipalCurvatures(PgElementSet geom,
                                                  PdMatrix[] shape,
                                                  PdVector[] pcValues,
                                                  PdVector[][] pcDirections,
                                                  boolean projectToTangentPlane,
                                                  boolean vertexBased)
        Computes the principal curvatures and directions at each vertex of the surface. The curvatures are integrated quantities. To get a piecewise linear shape operator use PnMassMatrix.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.
      • makeElementBasedPrincipalCurvatures

        public static PgVectorField[] makeElementBasedPrincipalCurvatures(PgElementSet geom,
                                                                          PdVector[] curvatureValues,
                                                                          boolean bIntegrated)
        Make element based principal curvature vector fields.
        Parameters:
        geom - Given geometry.
        curvatureValues - Output vector for curvature values. Dimension [numElements] or null.
        bIntegrated - If true, computes the curvatures integrated over the actual element.
        Author:
        Matthias Nieser
        Version:
        04.10.06, 1.30 revised (fk) Moved to PnUtil.
        04.10.06, 1.20 revised (fk) Return PgVectorField[] instead of PgFrameField.
        20.07.06, 1.10 revised (mn) Moved to PnFrameField and extract content to submethods.
        00.00.06, 1.00 created (mn)
      • makeVertexBasedPrincipalCurvatures

        public static PgVectorField[] makeVertexBasedPrincipalCurvatures(PgElementSet geom,
                                                                         PdVector[] curvatures,
                                                                         boolean bIntegrated)
        Make vertex based principal curvature vector fields. They are assembled in a frame field defined on the surface.

        The field is returned as PgVectorField[] because PgFrameField does not support vertex based vectors yet.

        Parameters:
        geom - Given geometry.
        bIntegrated - If true, computes the curvatures integrated over the actual element.
        Author:
        Matthias Nieser
        Version:
        10.08.06, 1.00 created (mn)
      • makeElementBasedPrincipalCurvatures

        public static PgVectorField[] makeElementBasedPrincipalCurvatures(PgElementSet geom,
                                                                          PdVector[] curvatureValues)
        Make element based principal curvature vector fields with an automatic calculated integration radius. It is r = 5*average edge length of the mesh.
        Parameters:
        geom - Given geometry.
        Author:
        Matthias Nieser
        Version:
        22.01.07, 1.00 created (mn)
      • makeElementBasedPrincipalCurvatures

        public static PgVectorField[] makeElementBasedPrincipalCurvatures(PgElementSet geom,
                                                                          PdVector[] curvatureValues,
                                                                          double radius)
        Make element based principal curvature vector fields.
        Parameters:
        geom - Given geometry.
        Author:
        Matthias Nieser
        Version:
        24.10.06, 1.00 created (mn)
      • makeVertexBasedPrincipalCurvatures

        public static PgVectorField[] makeVertexBasedPrincipalCurvatures(PgElementSet geom,
                                                                         PdVector[] curvatures,
                                                                         double radius)
        Make vertex based principal curvature vector fields.
        Parameters:
        geom - Given geometry.
        Author:
        Matthias Nieser
        Version:
        24.10.06, 1.00 created (mn)
      • calcEigensystem

        public static PdVector[] calcEigensystem(PdMatrix matrix,
                                                 PdVector normal,
                                                 PdVector[] eigenVectors,
                                                 PdVector eigenValues)
        Calculate the eigenvectors of the shape operator restricted to a given plane. The element [0] will contain the eigenvector of the absolute bigger eigenvalue.
        Parameters:
        matrix - 3x3 matrix representing the shape operator.
        normal - Normal vector to the plane.
        eigenVectors - Preallocated memory for eigenvectors. May be null.
        Author:
        Matthias Nieser
      • makeTrustFunction

        public static PdVector makeTrustFunction(PgVectorField vf,
                                                 PdVector[] curvatures,
                                                 boolean useSmoothProperty)
        Computes a scalar function indicating, how trusted the curvature information are in the actual point. Curvatures are treated as "trusted" if the curvature values k_1 and k_2 are not equal. Additionally, if the "smoothProperty" is used, curvatures are treated as less trusted at point where they are less smooth.
        Parameters:
        vf - TODO
        curvatures - minimal and maximal curvature value of field.
        Returns:
        A boolean array whether the elements are trusted.
        Author:
        Felix Kaelberer
        Version:
        08.02.10, 2.10 revised (fk) fixed: least trusted angle is 90 degrees, as principal curv dirs are unsigned.
        16.09.09, 2.00 revised (mn) Moved function smoothing to external method and moved method to dev.
        17.06.09, 1.10 revised (mn) Add parameter for smoothProperty and smoothFunction.
        17.06.09, 1.00 created (fk)
      • normalizeFrame

        public static void normalizeFrame(PdVector v1,
                                          PdVector v2,
                                          PdVector baseX,
                                          PdVector baseY,
                                          PdVector normal)
        Normalizes a vector frame consisting of two vectors v1, v2. The vectors will be normalized to a length of 1. If one vector is (nearly) 0, it will be set to the 90 degrees rotated other vector. If both are 0, an arbitrary orthonormal frame will be returned. The input vectors (baseX, baseY) must be an orthonormal frame of TM, normal the normal vector.
        Author:
        Matthias Nieser
        Version:
        09.03.15, 2.00 revised (kp) Moved to PwShapeOperator from devCovering.PnFrameField.
        08.08.06, 1.00 created (mn)
"JavaView? v5.03.003"

"

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

You see the box below because you did not login.