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

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.
 
Mathematics 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.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top