Iso cubes are axis-aligned cuboids, i.e. a cube with faces parallel to the x, y, and z plane. Iso cuboids are the 3 dimensional version of iso rectangles and shares the feature that it can be constructed from bounding boxes (in 3D). An Iso cube is degenerate all its vertices are coplanar.

## Usage

iso_cube(...)

is_iso_cube(x)

as_iso_cube(x)

## Arguments

...

Various input. See the Constructor section.

x

A vector of iso cubes or an object to convert to it

## Value

An euclid_iso_cube vector

## Constructors

3 dimensional iso cubes

• Providing a bbox will create iso cubes matching the bbox

• Providing two points will create iso cubes with the points as diagonal opposite vertices

• Providing 6 numeric will construct iso cubes with the given extent, with the numerics being interpreted in the following order: minimum x, minimum y, minimum z, maximum x, maximum y, and maximum z

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

Other Volumes: sphere(), tetrahedron()

## Examples

# Construction
p <- point(sample(10, 2), sample(10, 2), sample(10, 2))
iso_cube(p[1], p[2])
#> <3D euclid_iso_cubes [1]>
#> [1] [<x:9, y:6, z:1>, <x:10, y:6, z:1>, <x:10, y:7, z:1>, <x:9, y:7, z:1>, <x:9, y:7, z:9>, <x:9, y:6, z:9>, <x:10, y:6, z:9>, <x:10, y:7, z:9>]

iso_cube(4, 10, 7, 16, -4, 0)
#> <3D euclid_iso_cubes [1]>
#> [1] [<x:4, y:10, z:7>, <x:16, y:10, z:7>, <x:16, y:-4, z:7>, <x:4, y:-4, z:7>, <x:4, y:-4, z:0>, <x:4, y:10, z:0>, <x:16, y:10, z:0>, <x:16, y:-4, z:0>]

s <- sphere(point(5, 9, 2), 13)
iso_cube(bbox(s))
#> <3D euclid_iso_cubes [1]>
#> [1] [<x:1.39, y:5.39, z:-1.61>, <x:8.61, y:5.39, z:-1.61>, <x:8.61, y:12.6, z:-1.61>, <x:1.39, y:12.6, z:-1.61>, <x:1.39, y:12.6, z:5.61>, <x:1.39, y:5.39, z:5.61>, <x:8.61, y:5.39, z:5.61>, <x:8.61, y:12.6, z:5.61>]