|
|
On 11/19/2016 01:37 PM, John Greenwood wrote:
> I am experimenting with this:
> #version 3.7 ;
> global_settings {assumed_gamma 1.0 }
>
> camera {location <-10,40,-40> angle 4 look_at <0,0,0> }
> light_source {<-5,20,-20> colour rgb<1,1,1>}
> background { color rgb<0.2, 0.4, 0.8> }
>
>
> #declare Place = function {
> spline {
> linear_spline
> // -4, <-10,0,-2>
> -2, <0,0,-1>
> 0, <1,0,0>
> 2.0, <0,1,1>
> }
> }
> sphere {Place(-1),.1 pigment {color rgb < 1, 0, 0>}}
> sphere {Place(-.5),.1pigment {color rgb < 1, 1, 0>} }
> sphere {Place(-0),.1 pigment {color rgb < 0, 1, 0>}}
> sphere {Place(+.5),.1 pigment {color rgb < 1, 0, 1>}}
> sphere {Place(+1),.1 pigment {color rgb < 0, 0, 1>}}
>
> This seems to work but if I add another point by deleting the // I get an error
> which does not make sense (to me).
>
> Should it be possible to do arbitarily long bezier splines?
>
>
Hi John,
Yes, you should be able to have arbitrarily long splines. I've certainly
had much longer.
To me this looks like a parse bug going back to at least 3.6.1 where a
negative index value in other than the first entry fails.
A scene file with just this works:
#declare MySpline =
spline {
linear_spline
-4, <-10,0,-2>
0, <0,0,-1>
1, <1,0,0>
2.0, <0,1,1>
}
but this doesn't:
#declare MySpline =
spline {
linear_spline
-4, <-10,0,-2>
-0, <0,0,-1>
1, <1,0,0>
2.0, <0,1,1>
}
That said, I'll let this sit a bit in case those around longer know
something I do not and want to chime in.
Otherwise, I'll open up an issue for it in a day or two.
Bill P.
Post a reply to this message
|
|