POV-Ray : Newsgroups : povray.binaries.images : Object packing (4 images, ~200kB total) Server Time
18 Nov 2024 18:28:50 EST (-0500)
  Object packing (4 images, ~200kB total) (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Michael Andrews
Subject: Object packing (4 images, ~200kB total)
Date: 5 Apr 2004 11:05:36
Message: <407175c0@news.povray.org>
Hi Folks,

I've modified my previous 'binned' packing attempt to handle more 
general criteria. The four images show spheric, conic, cylindric (2d 
circular) and cubic (2d square) packing of differently sized objects 
just from defining a different intersection macro.

The next step will be to allow all of these interactions in one set of 
objects ...

The four frames took 1hour (3582 seconds) to parse on my 2400+ Athlon XP 
laptop.

Comments, etc?

Mike Andrews.


Post a reply to this message


Attachments:
Download 'array_fill21.jpg' (50 KB) Download 'array_fill22.jpg' (54 KB) Download 'array_fill23.jpg' (54 KB) Download 'array_fill24.jpg' (54 KB)

Preview of image 'array_fill21.jpg'
array_fill21.jpg

Preview of image 'array_fill22.jpg'
array_fill22.jpg

Preview of image 'array_fill23.jpg'
array_fill23.jpg

Preview of image 'array_fill24.jpg'
array_fill24.jpg


 

From: Hohum
Subject: Re: Object packing (4 images, ~200kB total)
Date: 5 Apr 2004 16:22:48
Message: <4071c018@news.povray.org>
The packing algorithm got me interested too, and I've delurked after several
years to make my first post. One even has mirrored spheres ;)

First one, simple packing, took a few seconds to parse.

Second one, variable sized spheres. 20,000 of them. Badly optimized code
took 15 hours. It taught me to save the coordinates to a file and load them
again for rendering though.

I hope I post this right....


Post a reply to this message


Attachments:
Download 'mixedrefl.jpg' (55 KB) Download 'mixed20000.jpg' (93 KB)

Preview of image 'mixedrefl.jpg'
mixedrefl.jpg

Preview of image 'mixed20000.jpg'
mixed20000.jpg


 

From: Dave VanHorn
Subject: Re: Object packing (4 images, ~200kB total)
Date: 5 Apr 2004 16:48:28
Message: <4071c61c$1@news.povray.org>
"Hohum" <hoh### [at] spamlesshotmailcom> wrote in message
news:4071c018@news.povray.org...
> The packing algorithm got me interested too, and I've delurked after
several
> years to make my first post. One even has mirrored spheres ;)

Interesting results with the cones.
Not a natural looking pack though, since if these were plants, there would
be smaller ones within the larger one's "kill zone", and the kill zones
would be a little irregular and inconsistent.

Still, nice image, and solid algorithm for mechanical bits.


Post a reply to this message

From: St 
Subject: Re: Object packing (4 images, ~200kB total)
Date: 5 Apr 2004 17:02:23
Message: <4071c95f@news.povray.org>
"Hohum" <hoh### [at] spamlesshotmailcom> wrote in message
news:4071c018@news.povray.org...
> The packing algorithm got me interested too, and I've delurked after
several
> years to make my first post. One even has mirrored spheres ;)

   Heh, I was going to ask Michael...  "Can different objects be
loaded at the same time?

    But you've answered my question. Is there some code around for
this? It would be appreciated.


> I hope I post this right....

   You did.  ;)

   ~Steve~


>
>
>


Post a reply to this message

From: Dan P
Subject: Re: Object packing (4 images, ~200kB total)
Date: 5 Apr 2004 22:49:30
Message: <40721aba$1@news.povray.org>
Michael Andrews wrote:

> Hi Folks,
> 
> I've modified my previous 'binned' packing attempt to handle more 
> general criteria. The four images show spheric, conic, cylindric (2d 
> circular) and cubic (2d square) packing of differently sized objects 
> just from defining a different intersection macro.
> 
> The next step will be to allow all of these interactions in one set of 
> objects ...
> 
> The four frames took 1hour (3582 seconds) to parse on my 2400+ Athlon XP 
> laptop.
> 
> Comments, etc?

I hope this message doesn't look like bandwidth-waste, but I gotta say 
that this thread is turning into one of the coolest threads I've ever seen!

-- 
Respectfully,
Dan P
http://<broken link>


Post a reply to this message

From: Lance Birch
Subject: Re: Object packing (4 images, ~200kB total)
Date: 5 Apr 2004 23:53:57
Message: <407229d5@news.povray.org>
"Hohum" <hoh### [at] spamlesshotmailcom> wrote in message
news:4071c018@news.povray.org...
> The packing algorithm got me interested too, and I've delurked after
several
> years to make my first post. One even has mirrored spheres ;)
>
> First one, simple packing, took a few seconds to parse.
>
> Second one, variable sized spheres. 20,000 of them. Badly optimized code
> took 15 hours. It taught me to save the coordinates to a file and load
them
> again for rendering though.
>
> I hope I post this right....

I really, really like these...

I'd love to see a set done in pure white, sitting in a shallow tray on a
little round table topped by a mozzaic of ceramic pieces, at rest on the
balcony of a house clinging to the patched cliffs of Atrani, overlooking the
ocean.  With radiosity, of course.

Lance.

thezone - thezone.firewave.com.au
thehandle - www.thehandle.com


Post a reply to this message

From: Lance Birch
Subject: Re: Object packing (4 images, ~200kB total)
Date: 5 Apr 2004 23:55:11
Message: <40722a1f@news.povray.org>
> little round table topped by a mozzaic

-z

Lance.

thezone - thezone.firewave.com.au
thehandle - www.thehandle.com


Post a reply to this message

From: Lance Birch
Subject: Re: Object packing (4 images, ~200kB total)
Date: 6 Apr 2004 00:44:23
Message: <407235a7@news.povray.org>
"Lance Birch" <-> wrote in message news:40722a1f@news.povray.org...
> > little round table topped by a mozzaic
>
> -z

Ah the result of hanging around the mozdev site too long.  After looking
through these posts again, and after having a coffee, I realised it should
be an s, not a z.  *shakes head*  8|

That aside and back on topic, I was wondering:  would it be possible to
adapt this to 3 dimensions?  I.e. filling a box with objects, rather than a
square?  I'm getting images in my head of a glass cube filled with hundreds
of other glass cubes of various sizes.  Sure, it'd be a pps=0 nightmare, but
it'd look cool!

Lance.

thezone - thezone.firewave.com.au
thehandle - www.thehandle.com


Post a reply to this message

From: Dave Matthews
Subject: Re: Object packing (4 images, ~200kB total)
Date: 6 Apr 2004 12:23:34
Message: <4072d986$1@news.povray.org>
Dan P wrote:


> I hope this message doesn't look like bandwidth-waste, but I gotta say 
> that this thread is turning into one of the coolest threads I've ever seen!

Actually, the coolest thread will be the one in scene-files, where we 
find out how this is done (hint, hint!)

Dave Matthews


Post a reply to this message

From: Hohum
Subject: Re: Object packing (4 images, ~200kB total)
Date: 6 Apr 2004 19:53:10
Message: <407342e6$1@news.povray.org>
"Dave Matthews" <dma### [at] nospamnet> wrote in message
news:4072d986$1@news.povray.org...
>
>
> Dan P wrote:
>
>
> > I hope this message doesn't look like bandwidth-waste, but I gotta say
> > that this thread is turning into one of the coolest threads I've ever
seen!
>
> Actually, the coolest thread will be the one in scene-files, where we
> find out how this is done (hint, hint!)
>
> Dave Matthews
>

Your wish is my command.
My less than optimal code in is now p.b.s-f, but it gets the job done.
Micheal Andrews results seem more flexible than mine, and faster too.

My code could be altered to do 3D checks, I believe it's the same principle
to check spherical clearance in 3D as it is for disc clearance in 2D.

taking x=difference in x coords of test points, etc
clearance is half the diameter of each object
2D
if x^2 + y^2 < clearance^2 then you are too close.
3D
if x^2 + y^2 + y^2 < clearance^2 then you are too close, I think.


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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