- C++ Game Development By Example
- Siddharth Shekar
- 300字
- 2021-06-24 14:26:16
Cross product
Cross product is the other vector multiplication form in which the resultant product of the multiplication is another vector. Taking the cross product between and
vectors will result in a third vector that it is perpendicular to both vectors
and
.
If you have two vectors, = (ax, ay, az) and
= (bx, by, bz), then
. is given as follows:
= (ay bz - az by, az bx - ax bz, ax by - ay bx)
The following is a matrix and graphical implementation of the cross product between vectors:

The direction of the resultant normal vector will obey the right-hand rule, where curling the fingers in the right hand from to
will cause the thumb to point in the direction of the resultant normal vector
.
Also note that the order in which you multiply the vectors is important as if you multiply the other way around then the resultant vector will be a point in the opposite direction.
The cross product will become very useful when we want to find the normal of the face of a polygon. For example, finding the normal of the face of a triangle.
Let us find the cross product of vectors = (3, -5, 7) and
= (2, 4 , 1):
C = A × B = (ay bz - az by, az bx - ax bz, , ax by - ay bx)
= (-5 * 1 - 7*4 , 7 * 2 - 3 * 1, 3 * 4 - (-5) * 2 )
= (-5-28, 14 - 3, 12 + 10)
= (-33, 11, 22)
- 用“芯”探核:龍芯派開發實戰
- FPGA從入門到精通(實戰篇)
- Learning AngularJS Animations
- 電腦常見故障現場處理
- 嵌入式系統設計教程
- Manage Partitions with GParted How-to
- AMD FPGA設計優化寶典:面向Vivado/SystemVerilog
- 電腦維護365問
- OpenGL Game Development By Example
- 超大流量分布式系統架構解決方案:人人都是架構師2.0
- “硬”核:硬件產品成功密碼
- LPC1100系列處理器原理及應用
- Hands-On Motion Graphics with Adobe After Effects CC
- Hands-On Deep Learning for Images with TensorFlow
- 基于網絡化教學的項目化單片機應用技術