POV-Ray : Newsgroups : povray.newusers : Collision Detection : Re: Collision Detection Server Time
2 Nov 2024 17:19:20 EDT (-0400)
  Re: Collision Detection  
From: Christopher James Huff
Date: 1 Nov 2003 09:33:24
Message: <cjameshuff-CBFD0B.09331501112003@netplex.aussie.org>
In article <web.3fa1f33040941870b9670050@news.povray.org>,
 "Robo210" <nomail@nomail> wrote:

> The problem I see with using imaginary spheres is that what I am doing
> amounts to dropping 400 pennies on the floor, but not wanting any to
> overlap or touch.  I really have no way of finding an object once I drop
> it, so checking anything like a radius of a sphere around it is out, unless
> I rewrite everything, which would be amazingly hard considering the varible
> amount of objects.  I guess I will have to be content with overlaps then, or
> else use millions of trace() calls.

This is certainly not an "amazingly hard" problem. Just store the 
locations of the objects in an array. Check each new point against the 
other points in the array, and then place an object at each point. No 
need for changing the number of objects to be any more difficult than 
changing a single value.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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