Vector Cross Product
Generate perfect perpendicular 3D surface normals out of flat 2D geometries.
How does it work? ↓The 3D Cross Product
If the Dot Product tells you how similar two vectors are (returning a single floating number), the Cross Product calculates a mathematically pure 90-degree angle (returning a brand new Vector).
When you feed the mathematical matrix two vectors, it evaluates exactly which direction is perfectly perpendicular to both inputs.
Why restrict the canvas to Z=0?
To fundamentally grasp the algebraic output of the Cross Product, it's easiest to lock Inputs A and B entirely flat to the ground (where Z equals 0). By moving Vectors A and B around the flat X/Y grid, the mathematics dictate that the ONLY possible direction perfectly perpendicular to a generic flat plane is straight up into the Z-Axis sky.
Vector C.z = (A.x * B.y) - (A.y * B.x)
Game Engines Output
If you switch the dropdown to Godot or Unity below, notice that you don't actually need to script the literal math yourself! Modern engines contain a `Vector3.Cross()` wrapper that natively computes the 3x3 Determinant scalar for you. This generates your physics surface normals to bounce lasers and compute polygon lighting!