POV-Ray : Newsgroups : povray.newusers : Help with CGS : Re: Help with CGS Server Time
6 Sep 2024 08:10:08 EDT (-0400)
  Re: Help with CGS  
From: Nieminen Mika
Date: 16 Apr 1999 10:34:06
Message: <37173c4e.0@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
: Don't
: ask me why this is so but I found after many hair pulling sessions and
: then finaly by asking in these groups how to solve my problem.

  Markus explained it well. You can also think about it this way:

#declare i=0;
#while(i<4)  // Make 4 copies of this:
                 merge { sphere { ... } }
 #declare i=i+1;
#end

  After parsing the result is:

                 merge { sphere { ... } }
                 merge { sphere { ... } }
                 merge { sphere { ... } }
                 merge { sphere { ... } }



  On the other hand:

merge {

#declare i=0;
#while(i<4)  // Make 4 copies of this:
                 sphere { ... }
 #declare i=i+1;
#end

}

  After parsing the result is:

merge {

                 sphere { ... }
                 sphere { ... }
                 sphere { ... }
                 sphere { ... }

}


  Sometimes the first behaviour is the wanted behaviour. For example:

union {

#declare i=0;
#while(i<4)  // Make 4 copies of this:
                 merge { sphere { ... } sphere { ... } }
 #declare i=i+1;
#end

}

  The result:

union {

                 merge { sphere { ... } sphere { ... } }
                 merge { sphere { ... } sphere { ... } }
                 merge { sphere { ... } sphere { ... } }
                 merge { sphere { ... } sphere { ... } }

}

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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