Cross Product: Difference between revisions

From Fancade Wiki
(Created page with "The Cross Product calculates the cross product of the two input vectors, and outputs another vector. /uploads/Cross Product1.png == Details == The Cross Product is a way of multiplying two vectors together. We can calculate the Cross Product of two vectors this way, let's say that the cross product of A and B is vector C: Cx = Ay × Bx - Az × By\ Cy = Az × Bx - Ax × Bz\ Cz = Ax × By - Ay × Bx It outputs the vector that is perp...")
 
(Updated and revisited the page)
 
Line 1: Line 1:
The Cross Product calculates the cross product of the two input vectors, and outputs another vector.
{{Block
 
|image=Cross Product.png
[[width=336px,alt=Cross Product|/uploads/Cross Product1.png]]
|type=s
|folder=math
|input1={{Port|v}}
|input2={{Port|v}}
|output1={{Port|v|Cross Product}}
}}
Calculates the [https://en.wikipedia.org/wiki/Cross_product cross product] of the two input vectors.


== Details ==
== Details ==


The Cross Product is a way of multiplying two vectors together.  
The Cross Product is a way of multiplying two vectors together.
We can calculate the Cross Product of two vectors this way, let's say that the cross product of A and B is vector C:
We can calculate the Cross Product of two vectors this way, let's say that the cross product of A and B is vector C:


Cx = Ay × Bx - Az × By\
<code>
Cy = Az × Bx - Ax × Bz\
Cx = Ay × Bx - Az × By
 
Cy = Az × Bx - Ax × Bz
 
Cz = Ax × By - Ay × Bx
Cz = Ax × By - Ay × Bx
</code>


It outputs the vector that is perpendicular to both input vectors (or the plane spanned by those two vectors).
It outputs the vector that is perpendicular to both input vectors (or the plane spanned by those vectors).


[[File:crossprod.png]]
[[File:Crossprod.png|frame|right]]


The length of that vector is equal to the area of the parallelogram formed by those two input vectors (each vector gives a pair of parallel sides). Not that common for this knowledge to be used, you would often use the vector for its direction and not its length.
The length of the output vector is equal to the area of the parallelogram formed by the input vectors (each vector gives a pair of parallel sides).




[[Category:Blocks]]
[[Category:Blocks]]

Latest revision as of 15:05, 17 May 2024

Cross Product
Cross Product.png
TypeScript block
ColliderNone
FolderMath
Ports
Inputs Vector
Vector
Outputs Cross Product

Calculates the cross product of the two input vectors.

Details

The Cross Product is a way of multiplying two vectors together. We can calculate the Cross Product of two vectors this way, let's say that the cross product of A and B is vector C:

Cx = Ay × Bx - Az × By

Cy = Az × Bx - Ax × Bz

Cz = Ax × By - Ay × Bx

It outputs the vector that is perpendicular to both input vectors (or the plane spanned by those vectors).

The length of the output vector is equal to the area of the parallelogram formed by the input vectors (each vector gives a pair of parallel sides).