Math module

normalized_plane_from_points

procedure · 1 overloadSource

The plane through three points, with a unit normal cross(p1 - p0, p2 - p0): the normal points towards the side from which p0, p1, p2 appear counter-clockwise. Collinear points give a zero normal.

ExampleOpen in playground ↗
p := normalized_plane_from_points(xyz(0, 0, 0), xyz(1, 0, 0), xyz(0, 1, 0));
assert(p.normal == xyz(0, 0, 1) && p.d == 0);
normalized_plane_from_points :: (
    p0: Vector3,
    p1: Vector3,
    p2: Vector3
) -> Plane3

The plane through three points, with a unit normal. The normal follows the winding of p0, p1, p2.

Parameters

p0: Vector3
the first point.
p1: Vector3
the second point.
p2: Vector3
the third point.

Returns

See also