Changes between Initial Version and Version 1 of olivine/dsl/types/coordinates


Ignore:
Timestamp:
May 21, 2020 10:29:17 PM (4 years ago)
Author:
jonathan
Comment:

Page introduction

Legend:

Unmodified
Added
Removed
Modified
  • olivine/dsl/types/coordinates

    v1 v1  
     1= 3D Coordinates =
     2Olivine 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 [wiki:olivine/dsl/types/core core types] prior to reading this section, it discusses `integer` and `real` numbers covered here.
     3
     4The 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.
     5
     6Here are some examples:
     7{{{
     8< 0, 5, 7 >
     9< -4, 6, 8 >
     10< 0, -0.2, 12.74 >
     11}}}
     12
     13= Predefined Coordinates =
     14Unit vectors are built-in with predefined names, they follow the syntax `< name >` where `name` is one of `EAST`, `WEST`, `NORTH`, `SOUTH`, `UP`, or `DOWN`.
     15
     16* `< EAST >` is the same as `< 1, 0, 0 >`
     17* `< WEST >` is the same as `< -1, 0, 0 >`
     18* `< NORTH >` is the same as `< 0, 0, -1 >`
     19* `< SOUTH >` is the same as `< 0, 0, 1 >`
     20* `< UP >` is the same as `< 0, 1, 0 >`
     21* `< DOWN >` is the same as `< 0, -1, 0 >`