Home

> 4D Blocks

> Version 6

  Controls
  Settings
  Block Motion
  Examples
> Scene Language
  Kinds of Blocks
  Goals
  History
  Versions

  General Information
> Constants
  Geometry Commands
  More Geometry Commands
  Train Commands
  Elevated Train Commands
  Scenery Commands

Constants

Axes

x y z w

Don't use "w" in 3D, of course. See below for info about how the axes are oriented.

Directions

x+ y+ z+ w+
x- y- z- w-

A direction is an axis plus a sign. When you first load a new file, the x axis points to the right and the y axis points upward.

In 3D, the coordinate system is left-handed, so the z axis points away from you.

In 4D, the overall coordinate system is probably also left-handed, but the z axis points in the "out" direction and looks right-handed. The w axis points away from you.

Unit Vectors

X+ Y+ Z+ W+
X- Y- Z- W-

If you make the letters uppercase, then instead of symbolic direction codes you get unit vectors. You can already enter vectors as arrays, so these are just shorthand, mainly for use with the "place" command. For example, "W-" is short for "[0 0 0 -1]". The vectors are all four-dimensional, but they still work with the three-dimensional "place" command.

Colors

The following colors are predefined. Other colors can be entered with the HTML syntax #RRGGBB.

red     cyan      orange   gray
green magenta brown white
blue yellow

Boolean Constants

true false

The Null Constant

The command "null" puts a null on the stack. The alias "?" is also defined for backward compatibility.

 

  See Also

  Geometry Commands