POV-Ray : Newsgroups : povray.binaries.images : Object packing (4 images, ~200kB total) : Re: Object packing (4 images, ~200kB total) Server Time
14 Nov 2024 02:24:30 EST (-0500)
  Re: Object packing (4 images, ~200kB total)  
From: Hohum
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

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