|
|
Yes! Passing an array of vectors to a spline is exactly what I mean.
Consider this:
#declare MyVectors=array[100]
#declare MySize=array[100]
#declare step_value=.01;
#declare my_index=0;
#while (my_index<1)
#declare my_radius=my_index*15;
#declare my_heading=sin(my_index*12)*pi/2;
#declare my_elevation=sin(my_index*28)*pi/32;
#declare my_x=cos(my_heading)*my_radius;
#declare my_z=sin(my_heading)*my_radius;
#declare my_y=sin(my_elevation)*my_radius;
#declare my_sphere_size=.5+sin(my_index*35)*.2;
sphere {<my_x,my_y,my_z>,my_sphere_size
pigment {color rgb <.8,.7,.9>}
}
#declare MyVectors[my_index*100]=<my_x, my_y, my_z>;
#declare my_index=my_index+step_value;
#end
This creates an array of vectors MyVectors[]. I could of course get things
smooth by using spheres and cylinders and decreasing the step_value, but how
much better if I could do something like
#declare myspline=spline{
linear_spline
#declare index=0;
#while (index<100)
MyVectors[index]
#declare index=index+1;
#end
}
This does NOT work! It returns with ERROR: Spline must have at least one
entry. The work-around I have been using is to use Python to generate in
it's shell window, copy them to the clipboard, and paste them into my POV
code directly. Clunky, but it works.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.590 / Virus Database: 373 - Release Date: 2/16/2004
Post a reply to this message
|
|