POV-Ray : Newsgroups : povray.advanced-users : Quadtrees/Octrees: Possible with POV's SDL? : Re: Quadtrees/Octrees: Possible with POV's SDL? Server Time
30 Jun 2024 02:05:37 EDT (-0400)
  Re: Quadtrees/Octrees: Possible with POV's SDL?  
From: Thorsten Froehlich
Date: 1 Apr 2011 07:12:37
Message: <4d95b325$1@news.povray.org>
On 31.03.11 20:39, stbenge wrote:
> Hi,
>
> I'm trying to find an efficient way to test all points within a set against
> each other. Quadtrees/octrees seem like the way to go, but... it appears
> that I need arrays containing vectors with other arrays mixed in. POV
> doesn't allow that sort of thing.
>
> Would something like this work for quad/octrees?
>
> #declare Array =
> array[2]{
> array[1]{
> <0,0,0>
> },
> array[2]{
> array[1]{
> <0,0,0>
> },
> array[1]{
> <0,0,0>
> }
> }
> }
>
> Am I assuming the worst? What would be a good way to structure my data?

You can build trees with POV-Ray arrays indeed. Note that arrays inside 
arrays do not need to have the same size or dimension.

     Thorsten


Post a reply to this message

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