POV-Ray : Newsgroups : povray.newusers : "difference" with a composed object : Re: "difference" with a composed object Server Time
6 Oct 2024 03:00:53 EDT (-0400)
  Re: "difference" with a composed object  
From: Chris B
Date: 18 Jul 2009 14:49:46
Message: <4a62194a$1@news.povray.org>
"McMinty" <nomail@nomail> wrote in message 
news:web.4a621451d328db22dc80fc610@news.povray.org...
> Hi,
>
> I want to have a thin box (or plate) with a lot of equaly spaced holes 
> inside.
>
> Basically I know how to do it and it already worked, but I needed ~17min 
> to
> render the picture, so I hope there is a better (faster) way to reach my 
> goal.
>

It turns out to be a lot quicker to create a small block with a hole in it 
and assemble those blocks.
Mike Williams has written up a choice of solutions to this problem at 
http://www.econym.demon.co.uk/holetut/index.htm


> ... snip ...
> Another thing I tried was not to have the macro but a normal definition
>
> ---------------
> #declare all_holes=#while ...... #end
> -------------
>
> My Problem with this solution was, that I alway got error messages from 
> the
> POVRay-Parser when I ended the line with a ";"
> But without the ";" all the spheres were actually drawn which is the 
> complete
> opposite from the thing I want to have.
> Only the rendering time was very short....
>

To declare your holes in this way you would still need the 'union' statement 
that you had in your macro. So you could do:

#declare all_holes = union{
  #while
  ... add your objects into the union here ...
  #end
}  // end of union


Regards,
Chris B.


Post a reply to this message

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