Dragging and changing a curve (image)

Jim Hurley jhurley at infostations.com
Thu Apr 15 10:30:19 EDT 2004


>
>Message: 9
>Date: Wed, 14 Apr 2004 14:36:32 +0200
>From: Beat Cornaz <beat.c at hetnet.nl>
>Subject: Re : Dragging and changing a curve (image)
>(snip)
>I'm VERY INTERESTED in the Bezier function by Alejandro. Where can I
>get that one?

Beat,

I found the math for the Bezier curve. The equations are a parametric 
representation rather than a y = f(x). But you  could still post that 
parametric representation as you move the Bezier points, that is:

x = 2 + 3 t + 4 t^2 + 4 t^3
y = 4 + 3 t + 2 t^2 + t^3

where the coefficients would vary as you moved the control points. 
Transcript even allows you to print the superscripts.

Jim
-----------------------------
Math for Bezier curve:

Bezier curves are created by taking a time-varying linear combination 
of the control points. The Bernstein polynomials (of degree 3) are 
used to calculate this linear combination given by the following 
equation where Pi is the ith control point:

P(t) = (1-t)^3 *P0 + 3*(1-t)^2*t*P1 + 3 *1-t)*t^2*P2 + t^3*P3 with t 
running from 0 to 1.



More information about the use-livecode mailing list