POV-Ray : Newsgroups : povray.newusers : Coupla "newb" questions... : Re: Coupla "newb" questions... Server Time
29 Jul 2024 12:29:57 EDT (-0400)
  Re: Coupla "newb" questions...  
From: St 
Date: 9 Jan 2006 15:49:24
Message: <43c2cc54@news.povray.org>
"Amazon_Warrior" <heu### [at] yahoocom> wrote in message 
news:43c1ab14@news.povray.org...
> Heyas!
>
> Just wondering if you can help.  I'm a relative newbie to POV, and  I've
> been trying to follow the help file included to solve this, but to no 
> avail.
> Basically, I want to create a nested while loop containing two different
> instructions- scale and translate- and apply it to a blob object.  The 
> help
> file suggests that I put the starting loop instructions just after the
> threshold statement of the blob object, like so:
>
> blob {
> threshold 0.5
> #declare Length = 0;
> #while ( Length >= -30 )
>  #declare Scale = 2;
>  #while ( Scale >= 0.25 )
>   sphere { <0,0,0>, 20, 1 scale <1,1,0.9> }
>   translate <Length,0,0>
>   scale Scale
>  #declare Length = Length - 0.25;
>  #declare Scale = Scale - 0.1;
> #end
> #end
> }
>
> However, when I run this, I get an error message:  No matching } in blob,
> sphere found instead.

   The only way I could get this particular code to parse, (on 3.5), is 
this:


 blob {
 threshold 0.5
 #declare Length = 0;
 #while ( Length >= -30 )
  #declare Scale = 2;
  #while ( Scale >= 0.25 )

   #end

   sphere { <0,0,0>, 20, 1 scale <1,1,0.9>
   translate <Length,0,0>
   scale Scale
  #declare Length = Length - 0.25;
  #declare Scale = Scale - 0.1;

   #end

    Let me know what you think, oh, and welcome to povray.

       ~Steve~


Post a reply to this message

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