Smoothing a curve: bezier curves, b-splines and Alejandro's PenTool Script

David Bovill david.bovill at gmail.com
Fri Oct 2 08:29:03 EDT 2009


2009/10/2 Alejandro Tejada <capellan2000 at yahoo.com>
>
> Alejandro Tejada wrote:
> David, i still hope that, later along the road,
> RunRev add directly to the engine, svg properties
> to vector graphics and create functions to
> transform them.

Sure it will come - just not this week :)

Still I am thinking it can't be that hard / there must be an easy to knock
up hack to:

interpolate points along a b-spline
guess a reasonable fit b-spine from a series of regular rev based control
points

I get returned from one data source b-splines that look like this:

where spline = (endp)? (startp)? point (triple)+
> and triple = point point point
> and endp = "e,%f,%f"
> and startp = "s,%f,%f"
> If a spline has points p1 p2 p3 ... pn, (n = 1 (mod 3)), the points
> correspond to the control points of a B-spline from p1 to pn. If startp is
> given, it touches one node of the edge, and the arrowhead goes from p1 to
> startp. If startp is not given, p1 touches a node. Similarly for pn and
> endp.
>

How would these triples relate to the work you've done?



More information about the use-livecode mailing list