|
|
rf242 <nomail@nomail> wrote:
> Ok so how does pov ray decide which triangles are in this subset or can you
> direct me to where in the pov ray source code this happens.
IIRC it puts the triangles in an octree, so testing a ray against the
entire mesh requires on average testing against about O(log n) triangles.
http://en.wikipedia.org/wiki/Octree
Another commonly-used data container is a K-d tree:
http://en.wikipedia.org/wiki/Kd-tree
(The basic difference between an octree and a K-d tree is that an octree
is always subdivided into 8 parts at each level, while a K-d tree is divided
only into two. It's just that each subsequent division is made alternatively
on each of the three axes, so the end result is similar, but more efficient.)
--
- Warp
Post a reply to this message
|
|