|
![](/i/fill.gif) |
In article <3fc8bf38@news.povray.org>, "Carl Hoff" <hof### [at] wt net> 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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |