POV-Ray : Newsgroups : povray.advanced-users : Bounding with a sky_sphere : Re: Bounding with a sky_sphere Server Time
2 Nov 2024 07:28:17 EDT (-0400)
  Re: Bounding with a sky_sphere  
From: Chris Huff
Date: 15 Feb 2000 20:01:45
Message: <chrishuff_99-A76129.20025615022000@news.povray.org>
In article <38a9ee95@news.povray.org>, "David Vincent-Jones" 
<geo### [at] galaxynetcom> wrote:

> Don't know about a tree like structure... I feel that might be more 
> useful with a pre-defined path; my journey needs to be quite random.

By a tree structure I was talking about the path the program would take 
to find an intersection.

union {//x
   union {//xA
      union {//xAA
         bounded_by {...}
      }
      union {//xAB
         bounded_by {...}
      }
      bounded_by {...}
   }
   union {//xB
      union {//xBA
         bounded_by {...}
      }
      union {//xBB
         bounded_by {...}
      }
      bounded_by {...}
   }
   bounded_by {...}
}

Assume the ray will hit the union "xBB". It will first be tested against 
x, which has a bounding object containing all it's parts. Since the test 
succeeds, it will then be tested against xA and xB. Because it doesn't 
hit anything in xA, but does hit something in xB, it will continue to 
test xBA and xBB, and find it's intersection with xBB. It skips anything 
in XA completely.
With certain configurations of shapes and certain slow-calculating 
objects, this can be much faster than just going through all of the 
objects and testing for them, which is what happens if you just put all 
of the objects in the scene.

At least, this is how I understand it. I might be wrong...

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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