Simbody  3.6
SimTK::Geodesic Class Reference

This class stores a geodesic curve after it has been determined. More...

Public Member Functions

 Geodesic ()
 Construct an empty geodesic. More...
 
int getNumPoints () const
 
const Array_< Transform > & getFrenetFrames () const
 Frenet frame of geodesic at arc length s: More...
 
Array_< Transform > & updFrenetFrames ()
 
void addFrenetFrame (const Transform &Kf)
 
Array_< Real > & updArcLengths ()
 
const Array_< Real > & getArcLengths () const
 
void addArcLength (Real s)
 
Array_< Real > & updCurvatures ()
 
const Array_< Real > & getCurvatures () const
 
void addCurvature (Real kappa)
 
Array_< Vec2 > & updDirectionalSensitivityPtoQ ()
 
const Array_< Vec2 > & getDirectionalSensitivityPtoQ () const
 
void addDirectionalSensitivityPtoQ (const Vec2 &jP)
 
Array_< Vec2 > & updDirectionalSensitivityQtoP ()
 
const Array_< Vec2 > & getDirectionalSensitivityQtoP () const
 
void addDirectionalSensitivityQtoP (const Vec2 &jQ)
 
Array_< Vec2 > & updPositionalSensitivityPtoQ ()
 
const Array_< Vec2 > & getPositionalSensitivityPtoQ () const
 
void addPositionalSensitivityPtoQ (const Vec2 &jtP)
 
Array_< Vec2 > & updPositionalSensitivityQtoP ()
 
const Array_< Vec2 > & getPositionalSensitivityQtoP () const
 
void addPositionalSensitivityQtoP (const Vec2 &jtQ)
 
void setTorsionAtP (Real tauP)
 
void setTorsionAtQ (Real tauQ)
 
void setBinormalCurvatureAtP (Real muP)
 
void setBinormalCurvatureAtQ (Real muQ)
 
Real getLength () const
 Return the total arc length of this geodesic curve. More...
 
Real calcLengthDot (const Vec3 &xdotP, const Vec3 &xdotQ) const
 Given the time derivatives of the surface coordinates of P and Q, calculate the rate of change of length of this geodesic. More...
 
const Vec3getPointP () const
 Return the location on the surface of the geodesic's starting point P, measured and expressed in the surface frame S. More...
 
const Vec3getPointQ () const
 Return the location on the surface of the geodesic's ending point Q, measured and expressed in the surface frame S. More...
 
const UnitVec3getNormalP () const
 Return the surface outward unit normal at P, which is aligned with the curve normal there but will have opposite sign if the geodesic curvature is positive at P. More...
 
const UnitVec3getNormalQ () const
 Return the surface outward unit normal at Q, which is aligned with the curve normal there but will have opposite sign if the geodesic curvature is positive at Q. More...
 
const UnitVec3getTangentP () const
 Return the unit tangent to the geodesic at P, pointing in the direction of increasing arc length parameters (i.e., towards Q). More...
 
const UnitVec3getTangentQ () const
 Return the unit tangent to the geodesic at Q, pointing in the direction of increasing arc length parameters (i.e., away from P). More...
 
const UnitVec3getBinormalP () const
 Return the unit binormal vector to the curve at P, defined as bP = tP X nP. More...
 
const UnitVec3getBinormalQ () const
 Return the unit binormal vector to the curve at Q, defined as bQ = tQ X nQ. More...
 
Real getCurvatureP () const
 Return the geodesic normal curvature at P, defined to be positive when the surface is convex in the curve tangent direction at P, negative if the surface is concave in that direction. More...
 
Real getCurvatureQ () const
 Return the geodesic normal curvature at Q, defined to be positive when the surface is convex in the curve tangent direction at Q, negative if the surface is concave in that direction. More...
 
Real getTorsionP () const
 Return the geodesic torsion at P, that is, the twisting of the Frenet frame as you move along the tangent towards Q. More...
 
Real getTorsionQ () const
 Return the geodesic torsion at Q, that is, the twisting of the Frenet frame as you move along the tangent away from P, that is, off the end of the geodesic. More...
 
Real getBinormalCurvatureP () const
 Return the surface curvature in the binormal direction at P; don't confuse this with the geodesic torsion at P. More...
 
Real getBinormalCurvatureQ () const
 Return the surface curvature in the binormal direction at Q; don't confuse this with the geodesic torsion at Q. More...
 
Real getJacobiP () const
 Return jP, the Jacobi field term giving the sensitivity of the P end of the geodesic to changes in tangent direction at the Q end, assuming the geodesic length is fixed. More...
 
Real getJacobiQ () const
 Return jQ, the Jacobi field term giving the sensitivity of the Q end of the geodesic to changes in tangent direction at the P end, assuming the geodesic length is fixed. More...
 
Real getJacobiPDot () const
 Return the derivative of jP with respect to s, the arc length of the geodesic (which always runs from P to Q). More...
 
Real getJacobiQDot () const
 Return the derivative of jQ with respect to s, the arc length of the geodesic. More...
 
Real getJacobiTransP () const
 
Real getJacobiTransQ () const
 
Real getJacobiTransPDot () const
 
Real getJacobiTransQDot () const
 
void clear ()
 Clear the data in this geodesic, returning it to its default-constructed state, although memory remains allocated. More...
 
void setIsConvex (bool isConvex)
 
void setIsShortest (bool isShortest)
 
void setInitialStepSizeHint (Real sz)
 
void setAchievedAccuracy (Real acc)
 
bool isConvex () const
 
bool isShortest () const
 
Real getInitialStepSizeHint () const
 
Real getAchievedAccuracy () const
 
void dump (std::ostream &o) const
 

Detailed Description

This class stores a geodesic curve after it has been determined.

The curve is represented by a discrete set of Frenet frames along its arc length, with each frame providing a point on the curve, the tangent along the curve there, surface normal, and binormal. The number of points is determined by the accuracy to which the geodesic was calculated and the complexity of the surface. For analytical geodesics, we'll sample the curve to generate enough points for visualization but the accuracy will be machine precision. The first point is at arclength s=0, the last is at the actual length of the geodesic. We call the first point P and the last point Q, and the geodesic arc length increases from P to Q, with the tangent always pointing in the direction of increasing arc length.

Constructor & Destructor Documentation

◆ Geodesic()

SimTK::Geodesic::Geodesic ( )
inline

Construct an empty geodesic.

Member Function Documentation

◆ getNumPoints()

int SimTK::Geodesic::getNumPoints ( ) const
inline

◆ getFrenetFrames()

const Array_<Transform>& SimTK::Geodesic::getFrenetFrames ( ) const
inline

Frenet frame of geodesic at arc length s:

  • origin: point on geodesic at s
  • z axis: outward surface (unit) normal n at s
  • y axis: unit tangent t at s in direction of increasing arc length
  • x axis: unit binormal at s: b=t X n (x=y X z)

Note that this convention is different from that of a curve, because our normal vector always points outwards from the surface.

◆ updFrenetFrames()

Array_<Transform>& SimTK::Geodesic::updFrenetFrames ( )
inline

◆ addFrenetFrame()

void SimTK::Geodesic::addFrenetFrame ( const Transform Kf)
inline

◆ updArcLengths()

Array_<Real>& SimTK::Geodesic::updArcLengths ( )
inline

◆ getArcLengths()

const Array_<Real>& SimTK::Geodesic::getArcLengths ( ) const
inline

◆ addArcLength()

void SimTK::Geodesic::addArcLength ( Real  s)
inline

◆ updCurvatures()

Array_<Real>& SimTK::Geodesic::updCurvatures ( )
inline

◆ getCurvatures()

const Array_<Real>& SimTK::Geodesic::getCurvatures ( ) const
inline

◆ addCurvature()

void SimTK::Geodesic::addCurvature ( Real  kappa)
inline

◆ updDirectionalSensitivityPtoQ()

Array_<Vec2>& SimTK::Geodesic::updDirectionalSensitivityPtoQ ( )
inline

◆ getDirectionalSensitivityPtoQ()

const Array_<Vec2>& SimTK::Geodesic::getDirectionalSensitivityPtoQ ( ) const
inline

◆ addDirectionalSensitivityPtoQ()

void SimTK::Geodesic::addDirectionalSensitivityPtoQ ( const Vec2 jP)
inline

◆ updDirectionalSensitivityQtoP()

Array_<Vec2>& SimTK::Geodesic::updDirectionalSensitivityQtoP ( )
inline

◆ getDirectionalSensitivityQtoP()

const Array_<Vec2>& SimTK::Geodesic::getDirectionalSensitivityQtoP ( ) const
inline

◆ addDirectionalSensitivityQtoP()

void SimTK::Geodesic::addDirectionalSensitivityQtoP ( const Vec2 jQ)
inline

◆ updPositionalSensitivityPtoQ()

Array_<Vec2>& SimTK::Geodesic::updPositionalSensitivityPtoQ ( )
inline

◆ getPositionalSensitivityPtoQ()

const Array_<Vec2>& SimTK::Geodesic::getPositionalSensitivityPtoQ ( ) const
inline

◆ addPositionalSensitivityPtoQ()

void SimTK::Geodesic::addPositionalSensitivityPtoQ ( const Vec2 jtP)
inline

◆ updPositionalSensitivityQtoP()

Array_<Vec2>& SimTK::Geodesic::updPositionalSensitivityQtoP ( )
inline

◆ getPositionalSensitivityQtoP()

const Array_<Vec2>& SimTK::Geodesic::getPositionalSensitivityQtoP ( ) const
inline

◆ addPositionalSensitivityQtoP()

void SimTK::Geodesic::addPositionalSensitivityQtoP ( const Vec2 jtQ)
inline

◆ setTorsionAtP()

void SimTK::Geodesic::setTorsionAtP ( Real  tauP)
inline

◆ setTorsionAtQ()

void SimTK::Geodesic::setTorsionAtQ ( Real  tauQ)
inline

◆ setBinormalCurvatureAtP()

void SimTK::Geodesic::setBinormalCurvatureAtP ( Real  muP)
inline

◆ setBinormalCurvatureAtQ()

void SimTK::Geodesic::setBinormalCurvatureAtQ ( Real  muQ)
inline

◆ getLength()

Real SimTK::Geodesic::getLength ( ) const
inline

Return the total arc length of this geodesic curve.

Will return zero if no curve has been calculated.

◆ calcLengthDot()

Real SimTK::Geodesic::calcLengthDot ( const Vec3 xdotP,
const Vec3 xdotQ 
) const
inline

Given the time derivatives of the surface coordinates of P and Q, calculate the rate of change of length of this geodesic.

Only the components of xdotP and xdotQ along the curve tangent directions can affect its length; moves in the normal or binormal direction leave the length unchanged.

◆ getPointP()

const Vec3& SimTK::Geodesic::getPointP ( ) const
inline

Return the location on the surface of the geodesic's starting point P, measured and expressed in the surface frame S.

◆ getPointQ()

const Vec3& SimTK::Geodesic::getPointQ ( ) const
inline

Return the location on the surface of the geodesic's ending point Q, measured and expressed in the surface frame S.

◆ getNormalP()

const UnitVec3& SimTK::Geodesic::getNormalP ( ) const
inline

Return the surface outward unit normal at P, which is aligned with the curve normal there but will have opposite sign if the geodesic curvature is positive at P.

◆ getNormalQ()

const UnitVec3& SimTK::Geodesic::getNormalQ ( ) const
inline

Return the surface outward unit normal at Q, which is aligned with the curve normal there but will have opposite sign if the geodesic curvature is positive at Q.

◆ getTangentP()

const UnitVec3& SimTK::Geodesic::getTangentP ( ) const
inline

Return the unit tangent to the geodesic at P, pointing in the direction of increasing arc length parameters (i.e., towards Q).

◆ getTangentQ()

const UnitVec3& SimTK::Geodesic::getTangentQ ( ) const
inline

Return the unit tangent to the geodesic at Q, pointing in the direction of increasing arc length parameters (i.e., away from P).

◆ getBinormalP()

const UnitVec3& SimTK::Geodesic::getBinormalP ( ) const
inline

Return the unit binormal vector to the curve at P, defined as bP = tP X nP.

◆ getBinormalQ()

const UnitVec3& SimTK::Geodesic::getBinormalQ ( ) const
inline

Return the unit binormal vector to the curve at Q, defined as bQ = tQ X nQ.

◆ getCurvatureP()

Real SimTK::Geodesic::getCurvatureP ( ) const
inline

Return the geodesic normal curvature at P, defined to be positive when the surface is convex in the curve tangent direction at P, negative if the surface is concave in that direction.

This is a scalar kappaP=-dot(DtP/ds,nP). Note that the geodesic curvature is the same as the surface curvature in the curve tangent direction.

◆ getCurvatureQ()

Real SimTK::Geodesic::getCurvatureQ ( ) const
inline

Return the geodesic normal curvature at Q, defined to be positive when the surface is convex in the curve tangent direction at Q, negative if the surface is concave in that direction.

This is a scalar kappaQ=-dot(DtQ/ds,nQ). Note that the geodesic curvature is the same as the surface curvature in the curve tangent direction, and remember that the curve tangent at Q points away from P, that is, off the end of the geodesic.

◆ getTorsionP()

Real SimTK::Geodesic::getTorsionP ( ) const
inline

Return the geodesic torsion at P, that is, the twisting of the Frenet frame as you move along the tangent towards Q.

The sign follows the right hand rule with your thumb directed along the tangent. This is a scalar tauP=-dot(DbP/Ds,nP).

◆ getTorsionQ()

Real SimTK::Geodesic::getTorsionQ ( ) const
inline

Return the geodesic torsion at Q, that is, the twisting of the Frenet frame as you move along the tangent away from P, that is, off the end of the geodesic.

The sign follows the right hand rule with your thumb directed along the tangent. This is a scalar tauQ=-dot(DbQ/Ds,nQ).

◆ getBinormalCurvatureP()

Real SimTK::Geodesic::getBinormalCurvatureP ( ) const
inline

Return the surface curvature in the binormal direction at P; don't confuse this with the geodesic torsion at P.

Surface curvature in a direction is a property of the surface independent of any curve.

◆ getBinormalCurvatureQ()

Real SimTK::Geodesic::getBinormalCurvatureQ ( ) const
inline

Return the surface curvature in the binormal direction at Q; don't confuse this with the geodesic torsion at Q.

Surface curvature in a direction is a property of the surface independent of any curve.

◆ getJacobiP()

Real SimTK::Geodesic::getJacobiP ( ) const
inline

Return jP, the Jacobi field term giving the sensitivity of the P end of the geodesic to changes in tangent direction at the Q end, assuming the geodesic length is fixed.

This is a scalar jP=dot(DP/DthetaQ,bP) where thetaQ is a right-hand-rule rotation about the normal nQ at Q. Caution: jP and jQ have opposite signs.

◆ getJacobiQ()

Real SimTK::Geodesic::getJacobiQ ( ) const
inline

Return jQ, the Jacobi field term giving the sensitivity of the Q end of the geodesic to changes in tangent direction at the P end, assuming the geodesic length is fixed.

This is a scalar jQ=-dot(DQ/DthetaP,bQ) where thetaP is a right-hand-rule rotation about the normal nP at P. Note that jQ has the opposite sign from jP.

◆ getJacobiPDot()

Real SimTK::Geodesic::getJacobiPDot ( ) const
inline

Return the derivative of jP with respect to s, the arc length of the geodesic (which always runs from P to Q).

That is jPDot = d/ds jP.

◆ getJacobiQDot()

Real SimTK::Geodesic::getJacobiQDot ( ) const
inline

Return the derivative of jQ with respect to s, the arc length of the geodesic.

That is, jQDot = d/ds jQ.

◆ getJacobiTransP()

Real SimTK::Geodesic::getJacobiTransP ( ) const
inline

◆ getJacobiTransQ()

Real SimTK::Geodesic::getJacobiTransQ ( ) const
inline

◆ getJacobiTransPDot()

Real SimTK::Geodesic::getJacobiTransPDot ( ) const
inline

◆ getJacobiTransQDot()

Real SimTK::Geodesic::getJacobiTransQDot ( ) const
inline

◆ clear()

void SimTK::Geodesic::clear ( )
inline

Clear the data in this geodesic, returning it to its default-constructed state, although memory remains allocated.

◆ setIsConvex()

void SimTK::Geodesic::setIsConvex ( bool  isConvex)
inline

◆ setIsShortest()

void SimTK::Geodesic::setIsShortest ( bool  isShortest)
inline

◆ setInitialStepSizeHint()

void SimTK::Geodesic::setInitialStepSizeHint ( Real  sz)
inline

◆ setAchievedAccuracy()

void SimTK::Geodesic::setAchievedAccuracy ( Real  acc)
inline

◆ isConvex()

bool SimTK::Geodesic::isConvex ( ) const
inline

◆ isShortest()

bool SimTK::Geodesic::isShortest ( ) const
inline

◆ getInitialStepSizeHint()

Real SimTK::Geodesic::getInitialStepSizeHint ( ) const
inline

◆ getAchievedAccuracy()

Real SimTK::Geodesic::getAchievedAccuracy ( ) const
inline

◆ dump()

void SimTK::Geodesic::dump ( std::ostream &  o) const

The documentation for this class was generated from the following file: