Skip to content

ebertolazzi/Clothoids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clothoids

A clothoid is a curve $(x(s),y(x))$ is described by the parametric equations:

$$ x(s)=\int_0^s \cos\left(\frac{1}{2}\kappa'\tau^2+\kappa_0\tau+\vartheta_0\right),\mathrm{d}\tau $$

$$ y(s)=\int_0^s \sin\left(\frac{1}{2}\kappa'\tau^2+\kappa_0\tau+\vartheta_0\right),\mathrm{d}\tau $$

when $\kappa'=0$ the clothoids reduce to a circle arc and when $\kappa'=\kappa_0=0$ the clothoids reduce to a straight segment.

This library implements algorithms for $G^1$ and $G^2$ fitting with clothoids, spline of clothoids, circle arc and biarc.

The implementation of the algorithms on clothoids, splines of clothoids, arc, bi-arc splines of biarcs are described in the works:

The library contains the following objects:

  • Segment
  • CircleArc
  • Clothoids
  • BiArc
  • spline of
    • Segment
    • CircleArc
    • Clothoids (with $G^1$ and $G^2$ continuity)
    • BiArc
  • Triangles
  • BBox (bounding box)

and fast algorithms involving the objects, in particular:

  • evaluation
  • intersection (between objects)
  • point-object distance

Library is written in C++11 with a MATLAB mex interface. Thus can be used in fast compiled application or in MATLAB scripts.

Compilation

To compile the C++11 library the easy way require cmake and rake

ruby setup.rb

then

rake

to build the MATLAB toolbox

cd toolbox
ruby populate_toolbox.rb
ruby build.rb

for more details see: online documentation at http://ebertolazzi.github.io/Clothoids/