# Primitives

`Meshes.Primitive`

— Type`Primitive{Dim,T}`

We say that a geometry is a primitive when it can be expressed as a single entity with no parts (a.k.a. atomic). For example, a sphere is a primitive described in terms of a mathematical expression involving a metric and a radius. See https://en.wikipedia.org/wiki/Geometric_primitive.

`Meshes.Line`

— Type`Meshes.Ray`

— Type`Ray(p, v)`

A ray originating at point `p`

, pointed in direction `v`

. It can be called as `r(t)`

with `t > 0`

to cast it at `p + t * v`

.

`Meshes.Plane`

— Type`Plane(p₀, v, w)`

A plane coincident with point `p₀`

, defined by non-parallel vectors `v`

and `w`

. It can be called as p(s, t) with numeric parameters `s`

and `t`

to cast it at `p₀ + s*v + t*w`

.

`Meshes.Box`

— Type`Box(min, max)`

An axis-aligned box with `min`

and `max`

corners. See https://en.wikipedia.org/wiki/Hyperrectangle.

**Example**

`Box(Point(0,0,0), Point(1,1,1)) # unit cube`

`Meshes.Cylinder`

— Type`Cylinder(start, finish, radius)`

A right circular cylinder with `start`

and `finish`

points, and `radius`

of revolution. See https://en.wikipedia.org/wiki/Cylinder.

`Meshes.Ball`

— Type`Ball(center, radius)`

A ball with `center`

and `radius`

.

`Meshes.Sphere`

— Type`Sphere(center, radius)`

A sphere with `center`

and `radius`

.