|
![](/i/fill.gif) |
I have a problem. The simple scene below works perfectly in P3.5,
but stops with an error in MegaPOV 1.0, which seems to expect
some kind of parenthesis after the spline's name. I've read MP's
docs without result.
Fabien.
//-------------------------------------
#include "colors.inc"
#include "rand.inc"
#declare R2=seed(0);
//macro to create a random spline
#macro RandSpline (NbPoints,Taille)
#local I = 0;
#while (I < 1)
#local Pt = Taille*VRand(R2);
#local Pt = Pt+<I*200,0,0>;
I,Pt
#local I=I+(1/NbPoints);
#end
#end
//macro to "draw" a line along a spline
#macro FollowSpline (Spl,NbElem,Rad1)
union {
#local Pas = (1/NbElem);
#local I = 0;
#while (I < 1)
#local Pt1 = Spl(I);
#local Pt2 = Spl(I+Pas);
#if (Pt1.x != Pt2.x)
cylinder {Pt1 Pt2 Rad1*0.5}
#end
#local I=I+Pas;
#end
}
#end
//creation of the random spline
#declare SplCam = spline {natural_spline RandSpline (10,30)}
//"physical" representation of that spline, this is where it stops
FollowSpline (SplCam,100,1)
Post a reply to this message
|
![](/i/fill.gif) |