Distance between polygons in 3d? (points of contact as a function of time)

Click For Summary

Discussion Overview

The discussion revolves around the mathematical representation of polygons in 3D space for the purpose of collision detection in a program. Participants explore how to express polygons as equations, particularly focusing on the dynamics of distance between moving polygons over time.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about representing a polygon as an equation in 3D, emphasizing the need for a method to calculate points of contact as a function of time.
  • Another participant notes that most 3D programs represent objects as collections of triangles and questions the necessity of a different approach.
  • A participant expresses a preference for precision and prediction over efficiency in collision detection, indicating a desire to develop a unique method rather than adopting existing techniques.
  • There is mention of advanced techniques involving convex hulls and Minkowski addition, though one participant admits to a lack of understanding of these concepts.
  • One participant proposes an equation related to the angles within a triangle but expresses uncertainty about its utility for finding minimum distances.
  • Clarification is made that the discussion is about the distance between two triangles, not just points on a triangle, and that this distance will vary over time.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for representing polygons or triangles in 3D for collision detection. Multiple competing views and approaches are presented, with some participants focusing on different aspects of the problem.

Contextual Notes

Participants express varying levels of familiarity with mathematical concepts relevant to the discussion, and there are indications of missing assumptions regarding the representation of polygons and the dynamics of their movement.

Requerent
Messages
8
Reaction score
0
I was just wondering, is there a way to write a polygon as an equation in 3d? (Yes, a polygon, NOT a polyhedra)

It's intended to be a part of a collision detection program, so I need to be able to represent all points on a given polygon as an equation. Each polygon is being acted upon by forces as a function of time, so if I set the distance to 0 and solve for time, I get the time of contact.

How can I represent a polygon in such a way? I know the position of all vertices that make up this polygon (and the one it is to be compared to). It looks something like this-

Position.A + Velocity.A * Time = Position.B + Velocity.B * Time
so,
Time = (Position.A-Position.B) / (Velocity.A-Velocity.B)

Where position is a polygon and velocity is a vector. It's more complicated than this, but all I need is a way to plug a polygon into position.
 
Physics news on Phys.org
Requerent said:
It's intended to be a part of a collision detection program, so I need to be able to represent all points on a given polygon as an equation. Each polygon is being acted upon by forces as a function of time, so if I set the distance to 0 and solve for time, I get the time of contact.

Practically every 3D program since the advent of computers represents all objects as a collection of triangles. Is there some need to do it a different way?

Here's some nice links for collision detection. This site actually has quite a few nice programming articles for computer graphics:

http://www.gamedev.net/reference/list.asp?categoryid=45#199
 
Last edited by a moderator:
Oh, polygon implies triangle =/ (i'm not a math person- sorry).

Most of those systems use a corrective technique, and focus on efficiency. I'm focusing on precision and prediction, which is not very efficient.

Advanced techniques use a convex hull through minkowski addition, I don't understand this one bit, and don't really want to figure it out until I can do proper face to face comparisons. Sadly, the way I'm comparing is not the way others typically do it. In such a way, I need a little help making my own as opposed to learning how others do it.

Most of those articles focus on Narrow phase isolation efficiency and 2D corrective techniques (or on stuff that I'm not quite ready for).

Would my problem be easier to explain in terms of triangles?

I think part of my problem is that I can't just set the distance to 0 and solve. I need to find the point of contact between two triangles and then solve for time. For lines/points it's easy, but for triangles I'm at a loss.
 
So you're looking for a way to find the distance between the two nearest points on a triangle?

Well, there's a nifty equation for a triangle. Given endpoints p0, p1, and p2, the triangle is the set of all points p such that:

Angle(p0, p, p1) + Angle(p1, p, p2) + Angle(p2, p, p0) = 360º

(where Angle(A, B, C) is the angle between line segments AB and BC).

I'm not sure how useful that equation would be to find a minimum distance.

You can parametrize both points in 4 variables, so it might be possible (but difficult) to do a calculus minimum-value style analysis.
 
Err, the distance between two Triangles, not two points on a triangle.

The distance between two triangles will change as a function of time. So I intend to set the distance to 0 and solve for time to see when their trajectories will touch.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
Replies
1
Views
2K
Replies
1
Views
8K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K