# Need help: Equation 2D -> 3D

#### 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

Neels

Related Other Physics Topics News on Phys.org

#### NEOclassic

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

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:

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving