|
|
"Greg M. Johnson" <gregj:-)565### [at] aolcom> skrev i melding
news:3d8771ed$1@news.povray.org...
> I read the docs but thought someone had a utility that make "visible"
> splines.
>
As ABX said, the spline itself is just a set of points. See the docs
[6.1.9] - "Spline Identifiers" for a better description..
If I understand your question right you want to make a spline "visible",
(show it's path). Then you just have to place objects along it with a #while
loop.
Something like this:
camera {
location z*-5 look_at 0
}
light_source {z*-15 1}
#declare My_Spline =
spline{
natural_spline
-1,< 1.5, 0,0>,// control point
0,< 1, 1,0>,
1,<-1, 1,0>,
2,<-1,-1,0>
3,< 1,-1,0>,
4,< 1, 0,0>,
5,< 0, 0,0>,
6,<-1, 0,0>// control point
}
#local Q = 0; // shows smoothed path
#while (Q < 5)
sphere {My_Spline(Q),0.1 pigment {rgb 1}}
#local Q = Q+0.1;// decrease to make smoother
#end
#local Q = -2;// shows spline points (control points too)
#while (Q < 7)
sphere {My_Spline(Q),0.15 pigment {rgb <1,0,0>}}
#local Q = Q+1;
#end
I reccomend docs [3.4.1.1] "Understanding The Concept of Splines", if you
haven't read it already!
Good luck!
-Peter
http://hertel.no/peter
Post a reply to this message
|
|