|
|
Yeah Mike, adding the minimum number of points for the spline type is the
key to this, yes. I was wrong (as I often can be going by memory) that the
splines were automatically factoring in a 0,<0,0,0> point.
It would interpolate from zero to nine if you had at least those two, of the
required three, points listed. That is linear then, having no offsets from a
direct line between them. In essence, you're the one in *control* [:)] of
the points and POV won't count anything not there (aside from inbetweens!).
You have to specify the minimum time values (and points) before it begins to
react according to the spline type.
You might want to give the following SDL a render, to see an example of the
spline types together in one image.
/* spline types comparison */
camera {location -10*z look_at 0}
light_source {-100, 1}
plane {z,0 pigment {checker color rgb 1/3 color rgb 2/3}}
#declare WireQ=
spline {
quadratic_spline
-1, <-5,-1,0>,
0, <-4,0,0>,
1, <-3,1,0>,
2, <-2,2,0>,
3, <-1,1,0>,
4, <0,0,0>,
5, <1,-1,0>,
6, <2,-2,0>,
7, <3,-1,0>,
8, <4,0,0>,
9, <5,1,0>,
10, <6,2,0>
}
#declare WireL=
spline {
linear_spline
-1, <-5,-1,0>,
0, <-4,0,0>,
1, <-3,1,0>,
2, <-2,2,0>,
3, <-1,1,0>,
4, <0,0,0>,
5, <1,-1,0>,
6, <2,-2,0>,
7, <3,-1,0>,
8, <4,0,0>,
9, <5,1,0>,
10, <6,2,0>
}
#declare WireC=
spline {
cubic_spline
-1, <-5,-1,0>,
0, <-4,0,0>,
1, <-3,1,0>,
2, <-2,2,0>,
3, <-1,1,0>,
4, <0,0,0>,
5, <1,-1,0>,
6, <2,-2,0>,
7, <3,-1,0>,
8, <4,0,0>,
9, <5,1,0>,
10, <6,2,0>
}
#declare WireN=
spline {
natural_spline
-1, <-5,-1,0>,
0, <-4,0,0>,
1, <-3,1,0>,
2, <-2,2,0>,
3, <-1,1,0>,
4, <0,0,0>,
5, <1,-1,0>,
6, <2,-2,0>,
7, <3,-1,0>,
8, <4,0,0>,
9, <5,1,0>,
10, <6,2,0>
}
#local Iterate= -1;
#while (Iterate <= 10)
sphere{
WireQ(Iterate),0.1
pigment { color red 1 }
translate +y
}
sphere{
WireL(Iterate),0.1
pigment { color rgb 1 }
translate 0
}
sphere{
WireC(Iterate),0.1
pigment { color green 1 }
translate -y
}
sphere{
WireN(Iterate),0.1
pigment { color blue 1 }
translate -2*y
}
#local Iterate=Iterate+0.1;
#end
Post a reply to this message
|
|