POV-Ray : Newsgroups : povray.general : Collision detection Server Time
19 Nov 2024 09:52:14 EST (-0500)
  Collision detection (Message 1 to 4 of 4)  
From: Kevin Loney
Subject: Collision detection
Date: 2 Mar 2002 15:03:57
Message: <3c81302d@news.povray.org>
Does anyone have any suggestions as to how I would go about detecting a
collision between an edge of a triangle and an object? vertex collision is
easy but the edge detection completly confuses me, I've had some ideas but
none of them are very practical, and they don't give me the point of
intersection.

--
Kevin
http://www.geocities.com/qsquared_1999/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Collision detection
Date: 2 Mar 2002 15:24:37
Message: <chrishuff-F735D5.15244202032002@netplex.aussie.org>
In article <3c81302d@news.povray.org>, "Kevin Loney" <klo### [at] pt2mcom> 
wrote:

> Does anyone have any suggestions as to how I would go about detecting a
> collision between an edge of a triangle and an object? vertex collision is
> easy but the edge detection completly confuses me, I've had some ideas but
> none of them are very practical, and they don't give me the point of
> intersection.

Use trace() along the edge of the triangle, if the distance to the 
intersection is less than the length of the edge, the edge collides with 
the object.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Kevin Loney
Subject: Re: Collision detection
Date: 2 Mar 2002 15:38:49
Message: <3c813859$1@news.povray.org>
I've considered that method which is by far the easiest but it won't work
very well for a cloth because I need to find the exact point of collision so
I can calculate accurate bounce.

--
Kevin
http://www.geocities.com/qsquared_1999/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Collision detection
Date: 2 Mar 2002 20:24:05
Message: <chrishuff-E8DC38.20240202032002@netplex.aussie.org>
In article <3c813859$1@news.povray.org>,
 "Kevin Loney" <klo### [at] pt2mcom> wrote:

> I've considered that method which is by far the easiest but it won't work
> very well for a cloth because I need to find the exact point of collision so
> I can calculate accurate bounce.

If you mean to find the point the side first hit the object, there is no 
way to do that exactly. You would have to use infinitely many steps.
However, you could do the tracing from both ends of the side, and pick a 
point in the middle of the two intersections for a slightly more 
accurate approximation. Or take the last position of the edge and the 
current position, and perform several samples to get a better result. I 
think the best solution is just a higher resolution cloth and smaller 
step values though.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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