How to translate an equation from 2D to 3D for collision response?

  • Thread starter Thread starter Nils Schneider
  • Start date Start date
  • Tags Tags
    2d 3d
Click For Summary
SUMMARY

The discussion focuses on translating a 2D collision response equation into a 3D context. The original equation provided by Neels is w2A = w1A + ( rAP x (j * n) ) / iA. Jim clarifies that the key difference lies in the use of vector cross product in 3D as opposed to vector dot product in 2D. He emphasizes the importance of understanding the right-hand rule and the geometric implications of 3D vectors for accurate collision response calculations.

PREREQUISITES
  • Understanding of vector mathematics, specifically vector cross product and dot product.
  • Familiarity with 3D physics concepts, including torque and magnetism.
  • Knowledge of collision response mechanics in game development or physics simulations.
  • Experience with programming languages suitable for implementing physics equations, such as C++ or Python.
NEXT STEPS
  • Research the implementation of vector cross product in 3D programming.
  • Study the right-hand rule and its applications in 3D physics.
  • Explore collision response algorithms used in game engines like Unity or Unreal Engine.
  • Learn about the mathematical foundations of torque and its relation to 3D vector mechanics.
USEFUL FOR

Game developers, physics simulation engineers, and anyone involved in 3D graphics or collision detection systems will benefit from this discussion.

Nils Schneider
Hello members,

I'm working on collision response at the moment. I have some good documents here but they are only for 2D. Can someone translate me this http://www.nilsschneider.de/temp/eq.jpg equation into code that works for 3D vectors as well? I fear that I'm doing something wrong here:

w2A = w1A + ( rAP x (j * n) ) / iA

Many thanks in advance.

Neels
 
Physics news on Phys.org
Originally posted by Nils Schneider
Hello members,

I'm working on collision response at the moment. I have some good documents here but they are only for 2D. Can someone translate me this http://www.nilsschneider.de/temp/eq.jpg equation into code that works for 3D vectors as well? I fear that I'm doing something wrong here:

w2A = w1A + ( rAP x (j * n) ) / iA

Many thanks in advance.

Neels

Hi Neels,
Off-hand it seems that you are not familiar with the difference between 2D - "vector dot product" and 3D - "vector cross product".
In 2D the trig nature (diagonal of parallelogram)implies that the labeling, as a product, hides the reality that the resultant is the scalar "sum" of the geometric aspects of the co-acting scalars.
On the other hand, physicists usually speak in non-math terminolgy to discuss 3D mechanics; e.g. they will use terms like: "right-hand rule" when referring to the obvious 3D phenomena apparent with dipolar things like torque and magnetism. You'll note that it's difficult to warp the two fingers and thumb of your right hand such that the angles between the pseudo-vectors are exactly perpendicular. This is where the "cross-product" treatment makes the magnitude of the 3D vector calculable: the rule is to join the xy vectors at the xy origin and determine the magnitude of the z-directed vector (from the xyz origin) that is the product of the magnitudes of the two xy vectors. Real life examples of 3D vector behavior are the electromagnet and the gyroscopic top. Cheers, Jim
 
Last edited:
I do not have a good working knowledge of physics yet. I tried to piece this together but after researching this, I couldn’t figure out the correct laws of physics to combine to develop a formula to answer this question. Ex. 1 - A moving object impacts a static object at a constant velocity. Ex. 2 - A moving object impacts a static object at the same velocity but is accelerating at the moment of impact. Assuming the mass of the objects is the same and the velocity at the moment of impact...

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
7
Views
6K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
1
Views
3K
Replies
10
Views
3K