Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::Clothoid Struct Referenceabstract

Curve with linear increasing curvature. Also called 'Euler Spiral'. More...

#include <C:/Trend/Development/Trax3/Code/trax/Curve.h>

Inheritance diagram for trax::Clothoid:

Classes

struct  Data
 Data defining the curve. More...

Public Member Functions

virtual spat::SquareMatrix< One, 2 > Jacobian (Length s) const =0
 Returns the partial derivatives of the position P to the parameters a and s in a matrix, customly called a 'Jacobian matrix'.
virtual const DataGetData () const noexcept=0
 Retrieves the data to construct this curve type. A roundtrip is guaranteed to be invariant.
Creation
Returns
The maximal reasonable range, the curve can be evaluated at.
Exceptions
std::invalid_argumentif the curve can not created from the input values.
virtual common::Interval< LengthCreate (Area a2)=0
 Create a clothoid with a*a.
virtual common::Interval< LengthCreate (AnglePerLength curvature0, AnglePerLength curvature1, Length length)=0
 Create a clothoid from a starting and ending curvature and a total length.
virtual common::Interval< LengthCreate (Length radius0, Length radius1, Length length)=0
 Create a clothoid from a starting and ending radius and a total length.
virtual common::Interval< LengthCreate (const Data &data)=0
 Create the Clothoid from data set for which it is guaranteed, that no calculational drift will happen e.g. in write/read cycles.
Public Member Functions inherited from trax::Curve
virtual const char * TypeName () const noexcept=0
virtual CurveType GetCurveType () const noexcept=0
virtual bool IsValid () const noexcept=0
virtual AnglePerLength Curvature (Length s) const =0
virtual AnglePerLength Torsion (Length s) const =0
virtual bool IsFlat () const noexcept=0
virtual void Transition (Length s, spat::Position< Length > &pos) const =0
 Copies the 3D Position at the specified location to pos.
virtual void Transition (Length s, spat::Vector< One > &tan) const =0
 Copies the 3D tangential vector at the specified location to tan.
virtual void Transition (Length s, spat::VectorBundle< Length, One > &bundle) const =0
 Copies the 3D Position and tangential vector at the specified location to bundle.
virtual void Transition (Length s, spat::VectorBundle2< Length, One > &bundle) const =0
 Copies the 3D Position and tangential and normal vectors at the specified location to bundle.
virtual void Transition (Length s, spat::Frame< Length, One > &frame) const =0
 Copies the 3D TBN-Frame at the specified location to frame.
virtual std::vector< LengthZeroSet () const =0
 Returns a list of parameters at which the normal vector flips from one side to the other.
virtual common::Interval< LengthRange () const =0
virtual spat::Vector< OneLocalUp () const =0
 Gives the Curve's idiosyncratic up direction. Some curves maintain some idea about where they have their upside, either because of their form (e.g Helix) or because it is extra defined (e.g. for Line). Some curves maintain no such notion (e.g. many Cubics).
virtual spat::Frame< Length, OneGetCurveLocalTransformation () const =0
virtual std::unique_ptr< Curve > Clone () const =0
 make an exact copy of this curve.
virtual bool Mirror (const spat::VectorBundle< Length, One > &mirrorPlane)=0
 Make a Curve with mirrored geometry (but of course one thet returns right handed frames).
virtual bool Equals (const Curve &toCurve, common::Interval< Length > range, Length epsilon_length=epsilon__length, Angle epsilon_angle=epsilon__angle) const =0
 Comparison.
 Curve (Curve &&)=delete
Curve & operator= (const Curve &)=delete
Curve & operator= (Curve &&)=delete

Static Public Member Functions

static dclspc std::unique_ptr< ClothoidMake () noexcept
 Makes a Clothoid object.
static Angle dclspc MaxAngle () noexcept
 Gets a limiting angle value.
Limits

Returns the limits on Clothoid creation from two curve radii and the curve length between those two points.

One of the values can be changed inside the returned limits so that the curve will still create.

Parameters
curvature0smaller of the two curvatures, curvature0 = 1 / radius0
curvature1bigger of the two curvatures, curvature1 = 1 / radius1
radius0bigger of the two radii.
radius1smaller of the two radii.
lengthalong the clothoid from the point of radius0 to radius1.
Returns
A tuple with the three limiting values (use std::get<i>() to extract).
Exceptions
std::invalid_argumentif the input values are invalid.
static std::tuple< common::Interval< AnglePerLength >, common::Interval< AnglePerLength >, common::Interval< Length > > dclspc Limits (AnglePerLength curvature0, AnglePerLength curvature1, Length length)
static std::tuple< common::Interval< Length >, common::Interval< Length >, common::Interval< Length > > dclspc Limits (Length radius0, Length radius1, Length length)

Additional Inherited Members

Public Types inherited from trax::Curve
enum class  CurveType {
  none = 0 , Line , Arc , Helix ,
  LineP , ArcP , HelixP , Clothoid ,
  Cubic , Spline , Rotator , RotatorWithOffset ,
  RotatorChain , PolygonalChain , SampledCurve , Parallel ,
  EEPCurve , EEPResidual , EEPAlternative , Unknown ,
  UserDefined
}
 Curve type identification values. More...
Protected Member Functions inherited from trax::Curve
 Curve (const Curve &)=default

Detailed Description

Curve with linear increasing curvature. Also called 'Euler Spiral'.

The curve starts at the Origin with tangent {1,0,0} and curvature k = s/a² with some fixed a.

Member Function Documentation

◆ Create() [1/4]

virtual common::Interval< Length > trax::Clothoid::Create ( AnglePerLength curvature0,
AnglePerLength curvature1,
Length length )
pure virtual

Create a clothoid from a starting and ending curvature and a total length.

a2 = l / (k1 - k0), [k0*a2,k1*a2]; l > 0_m, k1 > k0.

Parameters
curvature0curvature at the interval's near position.
curvature1curvature at the interval's far position.
lengthtotal length of the interval returned.
Returns
the interval on the clothoid that would the transition from curvature0 to curvature1.

◆ Create() [2/4]

virtual common::Interval< Length > trax::Clothoid::Create ( Area a2)
pure virtual

Create a clothoid with a*a.

Parameters
a2a*a, the Clothoids paramter squared.
Exceptions
std::invalid_argumentif a2 < 0.

◆ Create() [3/4]

virtual common::Interval< Length > trax::Clothoid::Create ( const Data & data)
pure virtual

Create the Clothoid from data set for which it is guaranteed, that no calculational drift will happen e.g. in write/read cycles.

Parameters
datadata set to create the curve from.

◆ Create() [4/4]

virtual common::Interval< Length > trax::Clothoid::Create ( Length radius0,
Length radius1,
Length length )
pure virtual

Create a clothoid from a starting and ending radius and a total length.

Parameters
radius0radius at the interval's near position.
radius1radius at the interval's far position.
lengthtotal length of the interval returned.

◆ Jacobian()

virtual spat::SquareMatrix< One, 2 > trax::Clothoid::Jacobian ( Length s) const
pure virtual

Returns the partial derivatives of the position P to the parameters a and s in a matrix, customly called a 'Jacobian matrix'.

For a general cuve C(x0(u),x1(u),...) where the parameters xi are functions of another parameter u it holds that:

/// 
/// dC/du = J * dx/du
///
/// 
Parameters
sparameter to evaluate the derivatives.
Returns
dP/da and dP/ds will make up the 0th and 1st column of the matrix.
Exceptions
std::bad_allocon memory exhaustion.

◆ MaxAngle()

Angle dclspc trax::Clothoid::MaxAngle ( )
staticnoexcept

Gets a limiting angle value.

Due to numerical complexity, the Clothoid can not get evaluated past this value. T = s*s/(2*a*a) <= MaximumAngle().

Returns
the maximum angle the tangent vector can rotate from the parameter 0_m to the end of the curve.

The documentation for this struct was generated from the following file:
  • C:/Trend/Development/Trax3/Code/trax/Curve.h