3D Coordinates
Olivine supports expressing 3-dimensional coordinates, in fact it pays to understand basic Linear Algebra in order to take full advantage of Olivine's spatial features. However, an elementary script designer can go a long way with just a basic understanding of coordinates in Olivine. It is a good idea to read-up on core types prior to reading this section, it discusses integer
and real
numbers covered here.
The basic syntax of an Olivine coordinate is < number X, number Y, number Z >
where number
is any integer
or real
number, and they each express the x, y and z component respectively. X expresses a location along the east/west axis, Y expresses a location along the up/down axis, and Z expresses a location along the north/south axis.
Here are some examples:
< 0, 5, 7 > < -4, 6, 8 > < 0, -0.2, 12.74 >
Predefined Coordinates
Unit vectors are built-in with predefined names, they follow the syntax < name >
where name
is one of EAST
, WEST
, NORTH
, SOUTH
, UP
, or DOWN
.
< EAST >
is the same as< 1, 0, 0 >
< WEST >
is the same as< -1, 0, 0 >
< NORTH >
is the same as< 0, 0, -1 >
< SOUTH >
is the same as< 0, 0, 1 >
< UP >
is the same as< 0, 1, 0 >
< DOWN >
is the same as< 0, -1, 0 >