Easy tangent arcs, and biarc approximation of splines

I've read and half-understood some papers that talk about the nice properties of biarcs or tangent arcs. The case where the direction of movement (tangent) is the same at the end of one primitive and the beginning of the next is an ideal case for trajectory planning, because there is no sharp corner at all.

biarcs.ngc is a o-word library and demo file. It includes O-words I call "arcto", "splineto", and "arcfrom". "arcto" creates a single arc or line from the last position to the given location while satisfying the tangency condition. "splineto" creates a number of arcs which approximate a cublic spline. "arcfrom" sets the initial conditions (position and tangent) and is used at the beginning of a sequence of moves.

The method used in "splineto" is much simpler than the methods described in papers (N points at equal 't' spacing on the spline are connected by arcs) but it gives good results for as few as 8 points). The screenshot shows 4, 8, 16, and 32 points used, but it is virtually impossible to tell the difference between 8, 16 and 32 at this zoom level. However, with this simple method the tangent of the last arc in the approximation is not controlled and generally does not match the spline's true end tangent.

These aren't technically biarcs but I'm too lazy to figure out the proper name and rename the files.

Files currently attached to this page:

biarcs-small.png1.9kB
biarcs.ngc5.2kB
biarcs.png34.8kB


(originally posted on the AXIS blog)

Entry first conceived on 14 February 2007, 22:32 UTC, last modified on 15 January 2012, 3:46 UTC
Website Copyright © 2004-2017 Jeff Epler