Skip to content

Instantly share code, notes, and snippets.

@BlackHC
Last active December 15, 2015 10:49
Show Gist options
  • Select an option

  • Save BlackHC/5248625 to your computer and use it in GitHub Desktop.

Select an option

Save BlackHC/5248625 to your computer and use it in GitHub Desktop.
to determine the intersection point of 3 planes in R^3:
if the 3 planes are specified using 4-component vectors a,b,c (a * v = 0 if the homogeneous vector v is on plane a, etc)
build the 4x4 matrix
(
x y z w
a^T
b^T
c^T
)
(x, y, z, w are helper symbols)
when you develop the determinant of the matrix along the x y z w row, the value of the subdeterminants (actually the cofactors, so including the (-1) powers) are the components of the generalized cross product result.
just divide by the w component to get the intersection point.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment