|
|
Folks,
I am a newbie and especially a newbie at the Scene Definition Language ...
I wanted to create a rotating spiral that was under variable control so I
coded:
#declare r=0.1;
#declare d=0.1;
#declare twists=2;
#declare index=0;
#declare num_spheres=3*twists;
sphere_sweep
{
b_spline,
num_spheres,
#while (index<num_spheres)
<-1,-1,index*d>, r,
<1,-1,index*d*2>, r,
<1,1,index*d*3>, r,
#declare index=index+4;
#end
I have *NOT* debugged the algorithm yet. That is not my challenge in this
posting. What is my challenge is that I get a parse syntax error. It seems
that the parser wants the "sphere_sweep" number of spheres to be a numeric.
I then ran the following test:
#declare index=0;
sphere_sweep
{
b_spline,
3,
#while (index<1)
<0,0,0>, 1
<1,1,1>, 1
<2,2,2>, 1
#declare index=index+1;
#end
}
This ends with an error:
Parse Error: Attempt to malloc zero size block(... sphsweep.cpp line: 1659)
Yikes!!!
Is there a problem with Sphere Sweep and SDL?
Neil
Post a reply to this message
|
|
|
|
> b_spline,
> 3,
Certian spline types require a minimum number of control points. b_spline,
for instance, I believe requires at least 4. If you just want a spline that
goes smoothly through each point, I would recommend using a cubic_spline,
for which you need a single extra point at the beginning and end of the
list; these two points won't be shown on the spline but they affect the
behavior of the spline at the beginning and end.
POV-Ray could/should probably give a better error message than "attempt to
malloc zero size block" for this sort of thing.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
|
|
Thanks guys, that was it. My bad understanding/reading of the sphere_sweep.
All is now good.
Thank you my friends.
Neil
"Slime" <fak### [at] emailaddress> wrote in message
news:41bba582$1@news.povray.org...
> > b_spline,
> > 3,
>
> Certian spline types require a minimum number of control points. b_spline,
> for instance, I believe requires at least 4. If you just want a spline
that
> goes smoothly through each point, I would recommend using a cubic_spline,
> for which you need a single extra point at the beginning and end of the
> list; these two points won't be shown on the spline but they affect the
> behavior of the spline at the beginning and end.
>
> POV-Ray could/should probably give a better error message than "attempt to
> malloc zero size block" for this sort of thing.
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>
Post a reply to this message
|
|