createFlattenAlongVectorToPlane MethodStatic

Create a matrix which sweeps a vector along sweepVector until it hits the plane through the origin with the given normal.

  • Geometrically, the returned matrix M acts on a vector u by rotating and scaling it to lie in the plane. Specifically, Mu = u + sw is perpendicular to n for some scalar s, where w is the sweep direction, and n is the plane normal.
  • Symbolically, M = I - w⊗n / w.n, where I is the identity, and ⊗ is the vector outer product.

createFlattenAlongVectorToPlane(sweepVector: Vector3d, planeNormal: Vector3d): undefined | Matrix3d

Parameter Type Description
sweepVector Vector3d sweep direction. If same as planeNormal, the resulting matrix flattens to the plane.
planeNormal Vector3d normal to the target plane

Returns - undefined | Matrix3d

Defined in

Last Updated: 17 December, 2024