Package org.djutils.draw.line
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 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
-
A_THRESOLD
static final double A_THRESOLD
???- See Also:
- Constant Field Values
-
A_SERIE_SIZE
static final int A_SERIE_SIZE
???- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
m_pi_2
static final double m_pi_2
Half Pi.- See Also:
- Constant Field Values
-
m_2pi
static final double m_2pi
Two Pi.- See Also:
- Constant Field Values
-
m_1_pi
static final double m_1_pi
One over Pi.- See Also:
- Constant Field Values
-
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 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
-
-