POV-Ray : Newsgroups : povray.newusers : Scaling question... : Re: Scaling question... Server Time
30 Jul 2024 22:18:34 EDT (-0400)
  Re: Scaling question...  
From: Christopher James Huff
Date: 29 Nov 2003 14:12:40
Message: <cjameshuff-710F40.14124629112003@netplex.aussie.org>
In article <3fc8bf38@news.povray.org>, "Carl Hoff" <hof### [at] wtnet> wrote:

> Ok... I'm very very new at RAY-Tracing and I'm not sure I
> could follow that.  Are you saying built the object up my only
> every taking the union of two shapes at a time.  Start by taking
> the union of two ellipsoids.  Then taking the union of two of
> those shapes and so on? 

Say you have 16 spheres in a line. o's are spheres, {} braces represent 
unions:
{{{{o o} {o o}} {{o o} {o o}}} {{{o o} {o o}} {{o o} {o o}}}}

Now, say you have a ray that will eventually hit the fifth sphere. The 
first bounding box test sees the bounds for the outermost union:
{                                                           }

Which it hits. The contents of that union are tested, and the next hit 
is this one:
{{                           }                              }

This eliminates half the spheres from consideration with one step. To 
continue:
{{              {           }}                              }
{{              {{   }      }}                              }
{{              {{o  }      }}                              }

Each step halves the number of remaining spheres. Note that you need to 
manually bound the unions used for this, or POV-Ray will just split it 
up and use its own automatic bounding scheme.


> Should merge be used as I know it removes all the interior surfaces? 

If the object is transparent, merge should be used, the overhead of 
removing internal surfaces is compensated for by not having to do 
texturing and lighting for those surfaces. If it is not transparent, the 
merge will be slower.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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