Random Filling Plane with objects (Message 1 to 4 of 4)
From: Leroy Whetstone
Subject: Random Filling Plane with objects
Date: 4 Apr 2011 16:09:23
Message: <4D9A2562.7050901@joplin.com>
I've been playing with randomly putting boxes on a plane. I think I've
come up with a pretty good technique.
I have an 2d array that acts as the plane. When every you place an
object you mark the array. But you don't just mark the location, you
treat the array as if it where a display screen and you paint the object
to it. And you also mark areas that around your object that no other
object could be placed there.
When you randomly choose a location you only have to check if there
is anything at that location. I use #ifdef statement as I don't fill the
2d array with anything except objects.
I've been using boxes and a 300*300 2D array. And getting fairly good
density (99%). And runs times less than 2 min. with display.
Just Bragging :)
I was wondering if any one else has use this technique.
From: Nekar Xenos
Subject: Re: Random Filling Plane with objects
Date: 4 Apr 2011 16:17:03
Message: <op.vtfjymztufxv4h@xena>
On Mon, 04 Apr 2011 22:09:06 +0200, Leroy Whetstone <lrw### [at] joplincom>
wrote:
> I've been playing with randomly putting boxes on a plane. I think I've > come up with a pretty good technique.> I have an 2d array that acts as the plane. When every you place an > object you mark the array. But you don't just mark the location, you > treat the array as if it where a display screen and you paint the object > to it. And you also mark areas that around your object that no other > object could be placed there.> When you randomly choose a location you only have to check if there> is anything at that location. I use #ifdef statement as I don't fill the > 2d array with anything except objects.> I've been using boxes and a 300*300 2D array. And getting fairly good> density (99%). And runs times less than 2 min. with display.> Just Bragging :)> I was wondering if any one else has use this technique.>
How does it differ from
POV-Ray\v3.7\scenes\advanced\blocks\
?
--
-Nekar Xenos-
From: Leroy Whetstone
Subject: Re: Random Filling Plane with objects
Date: 5 Apr 2011 01:42:19
Message: <4D9AABA9.6040308@joplin.com>
Nekar Xenos wrote:
> On Mon, 04 Apr 2011 22:09:06 +0200, Leroy Whetstone <lrw### [at] joplincom> > wrote:> >> I've been playing with randomly putting boxes on a plane. I think >> I've come up with a pretty good technique.>> I have an 2d array that acts as the plane. When every you place an >> object you mark the array. But you don't just mark the location, you >> treat the array as if it where a display screen and you paint the >> object to it. And you also mark areas that around your object that no >> other object could be placed there.>> When you randomly choose a location you only have to check if there>> is anything at that location. I use #ifdef statement as I don't fill >> the 2d array with anything except objects.>> I've been using boxes and a 300*300 2D array. And getting fairly good>> density (99%). And runs times less than 2 min. with display.>> Just Bragging :)>> I was wondering if any one else has use this technique.>>> > How does it differ from> POV-Ray\v3.7\scenes\advanced\blocks\> ?>
I fill an area with boxes not stack them. And it is fast! Really it's
just a start.
Next thing to try is to fill with spheres.
From: Leroy Whetstone
Subject: Re: Random Filling Plane with objects
Date: 13 Apr 2011 23:37:38
Message: <4DA66BE0.5030302@joplin.com>
Spheres placement done. Also I tried the same technique putting spheres
in a box.
Not so fast, it took 30 min. to place 170,000 in a 100*100*100 box
What got me started on this is an old random placement POV file that use
rather slow and time consuming algorithm. What I like about the
algorithm I use is that you have a choice of how close you want the
objects to be to each other. From touching to far apart.
Have Fun!