POV-Ray : Newsgroups : povray.newusers : Collision detection : Re: Collision detection Server Time
5 Sep 2024 18:19:56 EDT (-0400)
  Re: Collision detection  
From: Peter Popov
Date: 14 Jan 2000 16:59:00
Message: <CJd=OGp+expkMPB=3JNOI8w8f5Gg@4ax.com>
On Fri, 14 Jan 2000 13:19:24 -0000, "Tom Melly"
<tom### [at] tomandluforce9couk> wrote:

>Hi, has anyone got any general advice/links/macros/whatever on collision
>detection in POV?

It's a rather complex task and it does not have an unique non-discrete
solution. While you could work out methods for simple primitives
(spheres, planes and boxes come to mind), general objects will require
some means of tesselation. One way which pops up into my poor
insomnia-mutilated brain is to trace a bunch of rays (say a hundred)
using, for example, Nathan's jittered spiral method, save those in an
array, and then check them against the bounds of another object. This
will be useful for the rocks-on-a-height-field case you seem to be
most interested in. Of course at least one of the objects has to have
a simple insideness test (like most primatives do).

Detecting collision of two meshes (with the face- and vertex indices
known) is another thing. It is no new thing as it's done in many
commercial packages, one just has to look around and find it. Ken's
links on povray.org whould be a good starter.


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

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