|
|
"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
|
|