|
|
yoyodunno <nomail@nomail> wrote:
> Is there something I can do to make the distance values constant over each time
> value in the spline so that the animation has constant speed, which will also
> let me make multiple carts.
Distributing points at even distances on a spline is a non-trivial problem
because of how a spline is calculated. I don't know if there exists a
closed form expression for this (in other words, a single non-recursive
formula which can be used to calculate a point at a given length from the
beginning of the spline without resorting to an iterative approximation),
but the most common approach to this is to approach the problem iteratively.
In other words, when you want a point on the spline which is at a distance
x from the beginning of the spline, you sample points on the spline,
approximate their distance from the beginning, and then use something
like binary partitioning to get a point arbitrarily close to the actual point
you are searching.
IIRC Colefax's spline macro utility had such a functionality built-in
(but it's not related to the splines in POV-Ray 3.6).
--
- Warp
Post a reply to this message
|
|