Skip to contents

Geometries are collinear if they lie on the same line and coplanar if they lie on the same plane. collinearity can be tested between two curves or three points, weighted points, circles, or spheres. coplanarity can be tested between two surfaces or 4 points, weighted points, or spheres

Usage

collinear(x, y, z = NULL)

coplanar(x, y, z = NULL, t = NULL)

Arguments

x, y, z, t

Vector of geometries.

Value

A logical vector

Examples

# Collinear points
collinear(point(0, 0), point(1, 1), point(2, 2))
#> [1] TRUE

# Coplanar triangles
coplanar(
  triangle(point(0, 0, 0), point(1, 1, 1), point(1, 1, 0)),
  triangle(point(0, 0, 0), point(-1, -1, -1), point(-1, -1, 0))
)
#> [1] TRUE