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

In summary, the conversation discusses finding a way to represent a polygon as an equation in 3D for use in a collision detection program. The goal is to be able to accurately predict the time of contact between two polygons by setting the distance between them to 0 and solving for time. While most 3D programs use triangles for this purpose, the individual is looking for a more precise and efficient method. Possible approaches include using a convex hull through minkowski addition or parametrizing both points on a triangle and using calculus techniques to find the minimum distance between them over time.
  • #1
Requerent
8
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.
 
Mathematics news on Phys.org
  • #2
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 [Broken]
 
Last edited by a moderator:
  • #3
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.
 
  • #4
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.
 
  • #5
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.
 

What is the significance of calculating the distance between polygons in 3d?

Calculating the distance between polygons in 3d is important in various fields such as computer graphics, robotics, and physics. It helps in determining the collision and contact points between objects, which is crucial for simulating realistic movements and interactions.

How is the distance between polygons in 3d calculated?

The distance between polygons in 3d can be calculated using various geometric algorithms such as the closest point method or the separating axis theorem. These algorithms use the coordinates and dimensions of the polygons to determine the shortest distance between them.

What factors affect the distance between polygons in 3d?

The distance between polygons in 3d is affected by the size, shape, and orientation of the polygons. Other factors such as the speed and direction of movement, as well as the presence of obstacles, can also impact the distance between polygons.

What is the relationship between the distance between polygons and the points of contact?

The distance between polygons is directly related to the points of contact between them. As the distance decreases, the number of contact points increases. This relationship is important in determining the force and impact of collisions between objects.

How can the distance between polygons in 3d be optimized for efficient calculations?

To optimize the distance between polygons in 3d, various techniques such as bounding volume hierarchies and spatial partitioning can be used. These methods reduce the number of calculations required, making the process more efficient without compromising accuracy.

Similar threads

Replies
1
Views
2K
Replies
1
Views
1K
  • Special and General Relativity
Replies
23
Views
2K
Replies
5
Views
675
Replies
2
Views
133
Replies
3
Views
3K
Replies
1
Views
743
  • General Math
Replies
1
Views
855
Replies
17
Views
2K
  • Introductory Physics Homework Help
Replies
9
Views
723
Back
Top