POV-Ray : Newsgroups : povray.advanced-users : Quadtrees/Octrees: Possible with POV's SDL? Server Time
27 Jun 2024 13:51:13 EDT (-0400)
  Quadtrees/Octrees: Possible with POV's SDL? (Message 11 to 18 of 18)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Alain
Subject: Re: Quadtrees/Octrees: Possible with POV's SDL?
Date: 31 Mar 2011 22:30:58
Message: <4d9538e2@news.povray.org>

> "Trevor G Quayle"<Tin### [at] hotmailcom>  wrote:
>> Have a look at this thread from a few years ago
>>
>>
http://news.povray.org/povray.advanced-users/thread/%3C446b33a3@news.povray.org%3E/?ttop=356390&toff=300
>>
>>
>> -tgq
>
> Odd, link doesn;t show up in the web interface.
>
> -tgq
>
>
No problem on my side. Your link works good.


Alain


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Quadtrees/Octrees: Possible with POV's SDL?
Date: 31 Mar 2011 23:20:01
Message: <web.4d9543fbdc51ece9b05ef170@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:

> > "Trevor G Quayle"<Tin### [at] hotmailcom>  wrote:
> >> Have a look at this thread from a few years ago
> >>
> >>
http://news.povray.org/povray.advanced-users/thread/%3C446b33a3@news.povray.org%3E/?ttop=356390&toff=300
> >>
> >>
> >> -tgq
> >
> > Odd, link doesn;t show up in the web interface.
> >
> > -tgq
> >
> >
> No problem on my side. Your link works good.
>
>
> Alain

It's odd.  I've seen it recently on the web version.  The link isn't there in
the message, but does appear in the reply box (I can see it while typing this
response, but it won't be visible on the actual post).  Must be some html thing.

-tgq


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Quadtrees/Octrees: Possible with POV's SDL?
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

From: stbenge
Subject: Re: Quadtrees/Octrees: Possible with POV's SDL?
Date: 1 Apr 2011 13:09:42
Message: <4d9606d6@news.povray.org>
On 3/31/2011 5:54 PM, Trevor G Quayle wrote:
> "Trevor G Quayle"<Tin### [at] hotmailcom>  wrote:
>> Have a look at this thread from a few years ago
>>
>>
http://news.povray.org/povray.advanced-users/thread/%3C446b33a3@news.povray.org%3E/?ttop=356390&toff=300
>>

That discussion is interesting; it is now bookmarked :) I may eventually 
use a hybridized technique based on some of those principles.

>
> Odd, link doesn;t show up in the web interface.

The web interface is a bit buggy sometimes...


Post a reply to this message

From: stbenge
Subject: Re: Quadtrees/Octrees: Possible with POV's SDL?
Date: 1 Apr 2011 13:20:46
Message: <4d96096e@news.povray.org>
On 4/1/2011 4:12 AM, Thorsten Froehlich wrote:
> On 31.03.11 20:39, stbenge wrote:
>>
>> 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>
>>   }
>>  }
>> }
>>
>
> You can build trees with POV-Ray arrays indeed. Note that arrays inside
> arrays do not need to have the same size or dimension.

Right, I figured out that one :) I just can't mix objects, vectors, 
floats, other arrays, etc. together.

Do you think the above array structure would work for data trees though? 
Where each 1D array entry corresponds to a filled bucket? As I said 
before, I'm a total newbie when it comes to these things :(

Thanks Thorsten,

Sam


Post a reply to this message

From: stbenge
Subject: Re: Quadtrees/Octrees: Possible with POV's SDL?
Date: 1 Apr 2011 13:40:02
Message: <4d960df2$1@news.povray.org>
On 3/31/2011 12:59 PM, Christian Froeschlin wrote:
>> 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.
>
> You might be better off exporting data from another programming
> language.

Great suggestion, Christian! I spent the better part of yesterday doing 
just that.

The best option (and the most accessible) was to use voro++, a Voronoi 
library for C++. Now I can generate a list of nearest neighbors for each 
point, which will be useful for many things. In POV, testing the 
neighbors of 1024 points (even adding spheres to each point, cylinders 
between them) takes less than a second to parse! The calculations that 
the voro++ app itself performs take hardly any time at all. Of course to 
do this I now need to export my points from POV, run my application, and 
then run my scene file.

I may investigate the possibility of calling a batch file from within 
POV-Ray so I can perform calculations iteratively between frames. If I 
can do /that/, I can run a particle simulation with even more points 
than before :)

Sam


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Quadtrees/Octrees: Possible with POV's SDL?
Date: 3 Apr 2011 18:39:52
Message: <4d98f738@news.povray.org>
stbenge wrote:

> I may investigate the possibility of calling a batch file from within 
> POV-Ray so I can perform calculations iteratively between frames.

You can also take the reverse approach and write a batch
file that executes generator and render as needed.


Post a reply to this message

From: stbenge
Subject: Re: Quadtrees/Octrees: Possible with POV's SDL?
Date: 3 Apr 2011 23:53:59
Message: <4d9940d7$1@news.povray.org>
On 4/3/2011 3:39 PM, Christian Froeschlin wrote:
> stbenge wrote:
>
>> I may investigate the possibility of calling a batch file from within
>> POV-Ray so I can perform calculations iteratively between frames.
>
> You can also take the reverse approach and write a batch
> file that executes generator and render as needed.

Whichever way works best.... I'll find out :)

I read that for some discrete element methods (DEMs) the 
neighbor-finding part needs to only be calculated once every few frames. 
I'm sure this has its consequences, but it would be a good way to save 
time. Unfortunately I have no idea how to do that... I might need to 
write an extra program just to generate batch files on-the-fly...


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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