POV-Ray : Newsgroups : povray.newusers : A little CSG help : Re: A little CSG help Server Time
30 Jul 2024 02:17:21 EDT (-0400)
  Re: A little CSG help  
From: Mike Williams
Date: 12 Nov 2004 13:19:15
Message: <UR3dYEAJ5PlBFwEy@econym.demon.co.uk>
Wasn't it Chris B who wrote:
>
>"Mike Thorn" <mik### [at] realitycheckmultimediacom> wrote in message
>news:4194a758$1@news.povray.org...
>>Why do people often use planes (a huge
>> infinite object) to do CSG or create more complex geometrical figures?
>> Wouldn't it be easier in terms of size to use something a little
>> smaller, like a box?
>>
>> Or is rendering speed the answer?
>
>I find it easier to visualise with planes. Particularly when you need to
>rotate and translate the cutting surface.
>If you use a box, then you need to be a bit careful about where all of the
>other faces of the box will end up after rotation and translation, otherwise
>you could end up with spurious offcuts, floating around where you don't want
>them to be.
>
>I don't know whether there's a speed difference. When I used CSG in a hair
>macro I used boxes to cut each hair as I assumed that they were more
>efficient than planes, but I don't know if that's true.

Because planes are infinite, POV can't bound them, and it can't bound
the intersection of planes. POV can bound boxes. That's going to make a
big difference is you have large numbers of small unbounded objects in
your scene, because POV has to test each ray against every one of those
objects.

However, you probably have a reasonable idea of what sort of shape
you're trying to create with those planes, so you should be able to
figure out a good manual bound, and then there'll be little difference.
See shapes2.inc for some examples.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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