A tetrahedron, or triangular pyramid, is a polyhedron consisting of 4 triangles between 4 vertices. A tetrahedron splits the euclidean space in two by the plane defined by the first 3 vertices and the positive side being the side that includes the fourth vertex. If a all 4 vertices are coplanar the tetrahedron is considered degenerate. Tetrahedrons only exists in 3 dimensions.

## Usage

tetrahedron(...)

is_tetrahedron(x)

as_tetrahedron(x)

## Arguments

...

Various input. See the Constructor section.

x

A vector of tetrahedrons or an object to convert to it

## Value

An euclid_tetrahedron vector

## Constructors

3 dimensional tetrahedrons

• Providing four points will construct tetrahedrons in the order the points are given.

Other Geometries: circle(), direction(), iso_cube(), iso_rect(), line(), plane(), point(), ray(), segment(), sphere(), triangle(), vec(), weighted_point()

Other Volumes: iso_cube(), sphere()

## Examples

p <- point(sample(8), sample(8), sample(8))
tetrahedron(p[1:2], p[3:4], p[5:6], p[7:8])
#> <3D euclid_tetrahedrons [2]>
#> [1] [<x:8, y:5, z:8>, <x:5, y:3, z:6>, <x:4, y:8, z:1>, <x:7, y:1, z:7>]
#> [2] [<x:2, y:2, z:2>, <x:1, y:6, z:4>, <x:6, y:4, z:5>, <x:3, y:7, z:3>]