POV-Ray : Newsgroups : povray.programming : POV Ray execution speed is faster than the processor? : Re: POV Ray execution speed is faster than the processor? Server Time
27 Apr 2024 00:30:22 EDT (-0400)
  Re: POV Ray execution speed is faster than the processor?  
From: Warp
Date: 31 Oct 2011 13:29:51
Message: <4eaedb0e@news.povray.org>
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

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