|
![](/i/fill.gif) |
"Trevor Quayle" <Tin### [at] hotmail com> wrote in message
news:3bcddffa$1@news.povray.org...
> In 3.5, you would define a spline as follows:
>
> #declare MySpline =
> spline {cubic_spline
> -.25, <0,0,-1>
> 0.00, <1,0,0>
> 0.25, <0,0,1>
> 0.50, <-1,0,0>
> 0.75, <0,0,-1>
> 1.00, <1,0,0>
> 1.25, <0,0,1>
> }
>
> And implement it using MySpline(val)
>
> Does val not indicate the position along the spline, i.e, 0.1 would be 10%
> along the length of the spline etc.?
>
No. MySpline(0.1) calculates the value of the spline where the spline
parameter=0.1
In your example the distances between each 'control point' is the same, but
consider the following
#declare MySpline=
spline {
cubic_spline
-0.25, <0,0,0>
0.00,<1,0,0>
0.25,<2,0,0>
0.50,<4,0,0>
0.75,<8,0,0>
1.00,<16,0,0>
1.25,<32,0,0>
}
In the above case MySpline(0.1) will give me a value of <1.249,0.000,0.000>
which
is definatly not 10% of the way along the spline
Gail
--
*************************************************************************
* gsh### [at] monotix co za * Step into the abyss, *
* http://www.rucus.ru.ac.za/~gail/ * and let go. Babylon 5 *
*************************************************************************
* Just think of me as the storm before the calm Magic: The Gathering*
*************************************************************************
Post a reply to this message
|
![](/i/fill.gif) |