Class Clothoid

java.lang.Object
org.djutils.draw.line.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 final int
    ???
    (package private) static final double
    ???
    (package private) static final double[]
    Fresnel coefficients FD.
    (package private) static final double[]
    Fresnel coefficients FN.
    (package private) static final double[]
    Fresnel coefficients GD.
    (package private) static final double[]
    Fresnel coefficients GN.
    (package private) static final double
    One over Pi.
    (package private) static final double
    One over square root of Pi.
    (package private) static final double
    Two Pi.
    (package private) static final double
    Pi.
    (package private) static final double
    Half Pi.
  • Method Summary

    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)
    ???

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • A_THRESOLD

      static final double A_THRESOLD
      ???
      See Also:
    • A_SERIE_SIZE

      static final int A_SERIE_SIZE
      ???
      See Also:
    • 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_pi

      static final double m_pi
      Pi.
      See Also:
    • m_pi_2

      static final double m_pi_2
      Half Pi.
      See Also:
    • m_2pi

      static final double m_2pi
      Two Pi.
      See Also:
    • m_1_pi

      static final double m_1_pi
      One over Pi.
      See Also:
    • m_1_sqrt_pi

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

    • 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