Class Curve2dUtil

java.lang.Object
cz.fidentis.analyst.data.shapes.Curve2dUtil

public class Curve2dUtil extends Object
Utility class for analyzing 2D curves. Provides methods for spline interpolation, arc-length parameterization, curvature computation using osculating circle method, and derivative calculations.
  • Constructor Details

    • Curve2dUtil

      public Curve2dUtil()
  • Method Details

    • interpolateSplineWithArcLength

      public static org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction[] interpolateSplineWithArcLength(List<javax.vecmath.Point2d> points)
      Computes spline interpolation for 2D curve using arc-length parameterization. Generates separate splines for x and y.
      Parameters:
      points - 2D profile points
      Returns:
      Array of two splines: x spline and y spline
    • computeArcLengthParameterization

      public static double[] computeArcLengthParameterization(List<javax.vecmath.Point2d> points)
      Computes cumulative arc-lengths and normalizes them to range from 0.0 to 1.0. Resulting array represents relative positions of input points.
      Parameters:
      points - 2D profile points
      Returns:
      Array of normalized arc-length parameters
    • getOsculatingCircleCurvature

      public static List<Double> getOsculatingCircleCurvature(org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction[] splines, double[] t)
      Osculating circle Computes curvature of each point on the curve using osculating circle method.
      Parameters:
      splines - Array of PolynomialSplineFunction representing x and y splines
      t - Array of arc-length parameters
      Returns:
      List of curvature values. Higher values indicate higher curvature.
    • findMaxCurvatureIndex

      public static int findMaxCurvatureIndex(List<Double> curvatures)
      Finds index of point with the highest curvature. Search only inner third of values.
      Parameters:
      curvatures - List of curvature values
      Returns:
      Index of maximum curvature