views:

44

answers:

1

Hi. I have a 4-control-point bezier curve that represents some timing stuff. The first control is fixed at (0, 0) and the last control is fixed at (1, 1). The two points in between define a bezier curve that specifies how I get from 0 to 1.

Now I need to create a second curve, based off the first one. This second curve also needs to go from (0, 0) to (1, 1). But I'd like to to have the shape of some fraction of the first curve, for example it should look like the first 0.75 of the first curve.

In other words, if I'm using these curves for timing purposes, and I trace curve #1 for 10 seconds, and simultaneously trace curve #2 for 7.5 seconds, they follow the same path during the time they're both being traced. (Make sense?)

Is there a way to take the control points of the first curve and "scale" them into the second curve, given that fractional (0.75 in this example) parameter?

Thanks.

+2  A: 

Perhaps this will help: Subdividing a Bezier curve. You don't "scale" the control points, you calculate new ones.

This page has some nice applets demonstrating the algorithm.

Ned Batchelder
Excellent. Great starting point, thanks!
justadude