POV-Ray : Newsgroups : povray.general : Problems with #while construct ... (maybe a Sphere_Sweep problem) : Problems with #while construct ... (maybe a Sphere_Sweep problem) Server Time
2 Aug 2024 08:11:40 EDT (-0400)
  Problems with #while construct ... (maybe a Sphere_Sweep problem)  
From: Neil Kolban
Date: 11 Dec 2004 20:41:19
Message: <41bba1bf$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.