How to determine Normal Vector of two colliding edges?

  • Context: Graduate 
  • Thread starter Thread starter danong
  • Start date Start date
  • Tags Tags
    Normal Vector
Click For Summary

Discussion Overview

The discussion revolves around determining the normal vector for two colliding edges in a physics simulation involving rigid bodies. Participants explore various methods for calculating the normal vector during edge-edge collisions, including considerations for edge versus face normals and the challenges of detecting collisions accurately.

Discussion Character

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

Main Points Raised

  • One participant suggests attaching a coordinate system to one rectangular object, stating that the normal vector can be derived from the perpendicular lines to each face, but acknowledges the complexity of discussing both rectangles simultaneously.
  • Another participant clarifies that the focus should be on edge normals rather than face normals, emphasizing the need to find the normal vector between vertices of the colliding edges.
  • A different participant proposes finding two points on the edges such that the distance between them is minimal, asserting that the vector connecting these points represents the collision normal.
  • Some participants mention the Separating Axis Theorem (SAT) as a method for checking edge-edge collisions and deriving the collision normal, although the application of this method raises questions about its effectiveness in certain contexts.
  • One participant expresses a concern about the challenge of determining the difference between two colliding points that may be identical, suggesting a time-based approach to detect collisions when points are sufficiently close.
  • Another participant shares a link to their implementation of a rigid body dynamics simulation, indicating it is a preliminary attempt with limitations in collision detection accuracy.

Areas of Agreement / Disagreement

Participants express differing views on the best methods for determining the normal vector and detecting collisions, indicating that multiple competing approaches exist without a clear consensus on the most effective solution.

Contextual Notes

Some discussions highlight limitations in collision detection accuracy and the challenges of implementing these concepts in a simulation environment, particularly regarding edge versus face normals and the nuances of detecting collisions at very close distances.

danong
Messages
43
Reaction score
0
I am writing a physics simulation about the collision and reaction of the Rigid Body.
And now i have problem in determining the normal vector of two colliding edges.

For example,
I have 2 rectangulars ( whether or not it's of same size, anything can happens ),
and under some situations, they rotate and translate.
And finally, they come to contact each other with their edges.
How do i determine their refraction vector / normal vector correspondingly?

Just as shown as below :
/A/\B\

Thanks in advance.
 
Mathematics news on Phys.org
just attach a coordinate system to one of the "rectangulars", the line perpendicular to each face is the normal. of course you can do that for each "rectangular" but to talk about them both at the same time is pointless.

if you don't understand what I am saying then just imagine that one of them is stationary, that it has a normal perpendicular to each face, and that the other block is approaching it.

hopefully you know how to code that because i don't but i would be interested in seeing your program+source
 
mmm.. thanks for ur reply.
but sry, I'm having problem in edge normal not face normal.
or rather it would be vertices versus vertices normal.
hope it's clear =)
 
For an edge edge collision you find two points, one on the first edge and one on the second one so that the distance between them is minimal (it's easier than it sounds). The vector between those points is the collision normal.
But by the way, how do you check to see if you have an edge-edge collision? When I implemented something like this a while ago I used the SAT (google it) to tell if boxes where colliding. The cool thing is that after checking for collision you can use the collision axis (you'll read about that when you google for SAT) to get the collision normal for free.
 
daniel_i_l said:
For an edge edge collision you find two points, one on the first edge and one on the second one so that the distance between them is minimal (it's easier than it sounds). The vector between those points is the collision normal.
But by the way, how do you check to see if you have an edge-edge collision? When I implemented something like this a while ago I used the SAT (google it) to tell if boxes where colliding. The cool thing is that after checking for collision you can use the collision axis (you'll read about that when you google for SAT) to get the collision normal for free.

that is just the line orthogonal to both vertices. i actually just solve this problem recently. but it doesn't make sense to me as far as using it to apply some snell's law of relfection analogue or something
 
Yes, u guys are so right, it reminds me of the basic principle of normal vector.
It's the matter of vector of colliding points.
I got a proof from here:
http://www.cescg.org/CESCG-2000/PSovis/index.html

Btw, i found a new interesting & difficulty of implementing this,
that's how to actually find the difference of two colliding points seem they are actually the same exact point.
Well, umm my guess for my own way would be detecting them in a small increment of timer and when they come close enough, for a measurement of about < 0.1 distance, then i assume it's colliding.
Well that's the computing way =/
I'm not dealing with 3D simulation anyway, just my first implementation on rigid,
and I'm writing it on flash as it's just for my trial.
Will post it after i got it implemented and try for a 3d version with c++.
Bravo!
 
As promised, I've done my research and had applied it.
http://www.geocities.com/papaonn/RigidBodyDynamic.swf
It's just my first trial and i didn't do a proper accurate collision detection,
so if the simulation get stucked, just simply click reset button to restore it.
 
Last edited:

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
1K
Replies
1
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
4
Views
2K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 1 ·
Replies
1
Views
9K
  • · Replies 3 ·
Replies
3
Views
4K