|
|
Hi all there,
I've been playing with the nice Chris Colefax's macros for
a while now, but I encountered a problem I cannot solve since I'm
stupid in mathematics - or maybe blind when reading docs.
I wanna define a clock function based on a spline shape.
The spline is in 2D (x/y plane) in order to get y = f(x) with x
being the current clock value in the animation. The macros allow
to get the x,y coordinates for either a clock value along the
spline (spline_value; evaluate_spline with spline_clock option)
or a spline fraction (even_spline_value - btw, docs says it's
"spline_even_value", which is wrong). In any case it means you
get the coordinates depending on the spline length.
My problem is: how to get the y coordinate for a particular
x value ? I don't see any macro for that, and can't deal too much
with the internal maths in the code... Any help ?
Thanks !
*** Nicolas Calimet
*** http://pov4grasp.free.fr
Post a reply to this message
|
|
|
|
Nicolas Calimet <pov### [at] freefr> wrote:
> I've been playing with the nice Chris Colefax's macros for
> a while now, but I encountered a problem I cannot solve since I'm
> stupid in mathematics - or maybe blind when reading docs.
> I wanna define a clock function based on a spline shape.
> The spline is in 2D (x/y plane) in order to get y = f(x) with x
> being the current clock value in the animation. The macros allow
> to get the x,y coordinates for either a clock value along the
> spline (spline_value; evaluate_spline with spline_clock option)
> or a spline fraction (even_spline_value - btw, docs says it's
> "spline_even_value", which is wrong). In any case it means you
> get the coordinates depending on the spline length.
> My problem is: how to get the y coordinate for a particular
> x value ? I don't see any macro for that, and can't deal too much
> with the internal maths in the code... Any help ?
A spline that uses XYZ co-ordinates is actually four dimensional, with the
spline time as the extra dimension. Similarly, creating a flat spline
actually gives a function with three dimensions. What you want is a
two-dimensional function, which you *could* create using a one-dimensional
spline (e.g. specify spline points with only x co-ords).
I would imagine, however, that what you really want is to specify a list of
clock times and the target values you want at each time, with a function
that interpolates between each value. For this I would recommend my
Automatic Clock Modifier macros:
http://www.geocities.com/ccolefax/clockmod.html
It allows you to create timelines for values using a simple syntax, and in
addition to single float values you can interpolate/keyframe between
vectors, colours, pigments, textures, densities, and other map values. You
can also specify various transition types for between each keyframe value,
such as accelerate/decelerate, wave, oscillation, recoil, and more.
Post a reply to this message
|
|
|
|
Hello Chris, I hoped you actually would be the one to answer me ;-)
> What you want is a
> two-dimensional function, which you *could* create using a one-dimensional
> spline (e.g. specify spline points with only x co-ords).
Okay, I forgot the 'time' dimension and focused on 2D vectors as
it was the shortest way to see my spline curve... and again I was wrong
concerning the maths behind. I'm curious to see if I could manage it using
only x coords...
> For this I would recommend my
> Automatic Clock Modifier macros:
> http://www.geocities.com/ccolefax/clockmod.html
How could I miss that one ??!! It's strange I never tried to use
this other great utility I heard about quite a long time ago... I think
it's because at that time I simply didn't tried to animate anything in
POV. I started to read the tutorial linked from your page, and sure will
use these macros ! Woah this rocks... as everything you do for us !
Thanks Chris ! Long life to your amazing work ;-)
*** Nicolas Calimet
*** http://pov4grasp.free.fr
Post a reply to this message
|
|