Octant (solid geometry)
# Octant (solid geometry)

An octant in solid geometry is one of the eight divisions of a Euclidean three-dimensional coordinate system defined by the signs of the coordinates. It is similar to the two-dimensional quadrant and the one-dimensional ray.

The generalization of an octant is called orthant.

## Naming and numbering

A convention for naming an octant is to give its list of signs, e.g. (+,−,−) or (−,+,−). Octant (+,+,+) is sometimes referred to as the first octant, although similar ordinal name descriptors are not defined for the other seven octants. The advantages of using the (±,±,±) notation are its unambiguousness, and extensibility for higher dimensions.

The following table shows the sign tuples together with likely ways to enumerate them. A binary enumeration with − as 1 can be easily generalized across dimensions. A binary enumeration with + as 1 defines the same order as balanced ternary. The Roman enumeration of the quadrants is in Gray code order, so the corresponding Gray code is also shown for the octants.

Octants :

| Gray code | x | y | z | Binary | Binary | Binary | Binary | Balanced ternary | Balanced ternary |
| - | - | - | - | - | - | - | - | - | - |
| Gray code | x | y | z | − as 1 | − as 1 | + as 1 | + as 1 | | Balanced ternary | Balanced ternary |
| Gray code | x | y | z | < | > | < | > | < | > |
| 0 | + | + | + | 0 | 0 | 7 | 7 | 13 | 13 |
| 1 | − | + | + | 1 | 4 | 6 | 3 | 11 | −5 |
| 3 | + | − | + | 2 | 2 | 5 | 5 | 7 | 7 |
| 2 | − | − | + | 3 | 6 | 4 | 1 | 5 | −11 |
| 7 | + | + | − | 4 | 1 | 3 | 6 | −5 | 11 |
| 6 | − | + | − | 5 | 5 | 2 | 2 | −7 | −7 |
| 4 | + | − | − | 6 | 3 | 1 | 4 | −11 | 5 |
| 5 | − | − | − | 7 | 7 | 0 | 0 | −13 | −13 |

Quadrants for comparison :

| Roman | x | y | Binary | Binary | Binary | Binary | Balanced ternary | Balanced ternary |
| - | - | - | - | - | - | - | - | - |
| Roman | x | y | − as 1 | − as 1 | + as 1 | + as 1 | | Balanced ternary | Balanced ternary |
| Roman | x | y | < | > | < | > | < | > |
| I | + | + | 0 | 0 | 3 | 3 | 4 | 4 |
| II | − | + | 1 | 2 | 2 | 1 | 2 | −2 |
| IV | + | − | 2 | 1 | 1 | 2 | −2 | 2 |
| III | − | − | 3 | 3 | 0 | 0 | −4 | −4 |

Verbal descriptions are ambiguous, because they depend on the representation of the coordinate system. In the two depicted representations of a right-hand coordinate system, the first octant could be called right-back-top or right-top-front respectively.

