POV-Ray : Newsgroups : povray.newusers : Onion : Re: Onion Server Time
28 Jul 2024 14:28:51 EDT (-0400)
  Re: Onion  
From: Chris B
Date: 15 Feb 2009 12:47:17
Message: <49985525@news.povray.org>
"Matija" <nomail@nomail> wrote in message 
news:web.49984f6d272aa89be30e02620@news.povray.org...
>
> Also, the fact that the loop adds more subtractors to the first sphere 
> with each
> repeating "difference" statement is sort of unexpected for me. I thought 
> each
> statement would be treated separately, because the "difference" statement 
> was
> closed by the {} brackets.
>

It does treat them separately. Each time around the loop it creates a 
difference between two spheres. Unless you add the union statement, which 
tells POV-Ray to treat them as a single object, the shells continue to be 
treated separately. This is why, in the code you posted, only the first got 
assigned to 'Onion' .

It can take a little while to get used to how to read the code the way 
POV-Ray will interpret it.

Regards,
Chris B.


Post a reply to this message

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