Class Clothoid


  • public final class Clothoid
    extends Object
    Approximate a clothoid with a PolyLine3d.
    Derived from https://github.com/ebertolazzi/G1fitting/blob/master/src/Clothoid.cc
    Author:
    Alexander Verbraeck, Peter Knoppers
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int A_SERIE_SIZE
      ???
      (package private) static double A_THRESOLD
      ???
      (package private) static double[] FD
      Fresnel coefficients FD.
      (package private) static double[] FN
      Fresnel coefficients FN.
      (package private) static double[] GD
      Fresnel coefficients GD.
      (package private) static double[] GN
      Fresnel coefficients GN.
      (package private) static double m_1_pi
      One over Pi.
      (package private) static double m_1_sqrt_pi
      One over square root of Pi.
      (package private) static double m_2pi
      Two Pi.
      (package private) static double m_pi
      Pi.
      (package private) static double m_pi_2
      Half Pi.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int buildClothoid​(double x0, double y0, double theta0, double x1, double y1, double theta1)
      Create a clothoid connecting (x0,y0) to (x1,y1) having direction theta0 at the start point and theta1 at the end point.
      static int buildClothoidMoreResults​(double x0, double y0, double theta0, double x1, double y1, double theta1)
      Create a clothoid connecting (x0,y0) to (x1,y1) having direction theta0 at the start point and theta1 at the end point.
      (package private) static void GeneralizedFresnelCS​(int nk, double a, double b, double c, double[] intC, double[] intS)
      ???
    • Field Detail

      • FN

        static final double[] FN
        Fresnel coefficients FN.
      • FD

        static final double[] FD
        Fresnel coefficients FD.
      • GN

        static final double[] GN
        Fresnel coefficients GN.
      • GD

        static final double[] GD
        Fresnel coefficients GD.
      • m_1_sqrt_pi

        static final double m_1_sqrt_pi
        One over square root of Pi.
    • Method Detail

      • GeneralizedFresnelCS

        static void GeneralizedFresnelCS​(int nk,
                                         double a,
                                         double b,
                                         double c,
                                         double[] intC,
                                         double[] intS)
        ???
        Parameters:
        nk - int; ?
        a - double; ?
        b - double; ?
        c - double; ?
        intC - double[]; stores C results
        intS - double[]; stores S results
      • buildClothoid

        public static int buildClothoid​(double x0,
                                        double y0,
                                        double theta0,
                                        double x1,
                                        double y1,
                                        double theta1)
        Create a clothoid connecting (x0,y0) to (x1,y1) having direction theta0 at the start point and theta1 at the end point.
        Parameters:
        x0 - double; x coordinate of the start point
        y0 - double; y coordinate of the start point
        theta0 - double; direction at the start point (in radians)
        x1 - double; x coordinate of the end point
        y1 - double; y coordinate of the end point
        theta1 - double; direction at the end point (in radians)
        Returns:
        int; the number of iterations
      • buildClothoidMoreResults

        public static int buildClothoidMoreResults​(double x0,
                                                   double y0,
                                                   double theta0,
                                                   double x1,
                                                   double y1,
                                                   double theta1)
        Create a clothoid connecting (x0,y0) to (x1,y1) having direction theta0 at the start point and theta1 at the end point.
        Parameters:
        x0 - double; x coordinate of the start point
        y0 - double; y coordinate of the start point
        theta0 - double; direction at the start point (in radians)
        x1 - double; x coordinate of the end point
        y1 - double; y coordinate of the end point
        theta1 - double; direction at the end point (in radians)
        Returns:
        int; the number of iterations