Package org.djutils.draw.line
Class Clothoid
java.lang.Object
org.djutils.draw.line.Clothoid
Approximate a clothoid with a PolyLine3d.
Derived from https://github.com/ebertolazzi/G1fitting/blob/master/src/Clothoid.cc
Derived from https://github.com/ebertolazzi/G1fitting/blob/master/src/Clothoid.cc
- Author:
- Alexander Verbraeck, Peter Knoppers
-
Field Summary
Modifier and TypeFieldDescription(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 TypeMethodDescriptionstatic 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 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[] FNFresnel coefficients FN. -
FD
static final double[] FDFresnel coefficients FD. -
GN
static final double[] GNFresnel coefficients GN. -
GD
static final double[] GDFresnel coefficients GD. -
m_pi
static final double m_piPi.- See Also:
-
m_pi_2
static final double m_pi_2Half Pi.- See Also:
-
m_2pi
static final double m_2piTwo Pi.- See Also:
-
m_1_pi
static final double m_1_piOne over Pi.- See Also:
-
m_1_sqrt_pi
static final double m_1_sqrt_piOne 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 resultsintS
- 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 pointy0
- double; y coordinate of the start pointtheta0
- double; direction at the start point (in radians)x1
- double; x coordinate of the end pointy1
- double; y coordinate of the end pointtheta1
- 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 pointy0
- double; y coordinate of the start pointtheta0
- double; direction at the start point (in radians)x1
- double; x coordinate of the end pointy1
- double; y coordinate of the end pointtheta1
- double; direction at the end point (in radians)- Returns:
- int; the number of iterations
-