Home > Flex, Math > Text Along a Spline IV

Text Along a Spline IV

October 15, 2008

In many practical circumstances, the amount of text to be distributed along a curved path exceeds the length of the path. It is possible to extrapolate parametric curves beyond the normal [0,1] domain, however, arc-length parameterization applies only to the restricted domain. Arc-length parameterization is necessary to uniformly distribute text along the curve.

One reasonable compromise is to use the tangent approximation at the end of the curve to extrapolate along a straight line. This approach is also computationally efficient as a single unit vector and normal can be reused for each letter distributed along the line.

This approach is illustrated below.

I still have one small glitch to work out with this approach and then I will put the text-along-spline code on the back burner.  The next big priority is to help the Degrafa team start to move Singularity code into the Degrafa code base.  The first step in this process will be to rewrite the cubic Bezier spline to be independent of the current Composite class.  Although I can’t predict every possible porting issue, at a high level it should be largely a matter of replacing the FastBezier class with the Degrafa cubic Bezier class.

At least that’s the way it looks on paper 🙂  More to come later!

Advertisements
%d bloggers like this: