Here is a list of the names that are defined when GeomLab starts. These are the names that you can initially used in expressions, both constants that stand for values themselves, and functions that can be applied to other values. Also included in the list are the operators that can be used in expressions.
x + y, x - y, x * y,
x / y- x, ~ xx < y, x <= y, x = y,
x <> y, x >= y, x > yint(x)x. This is the
greatest integer n such that
n <= x; it has the property that if k is
any integer, then k <= x if and
only if k <= n. (EWD)x div y, x mod yx div y = int(x/y) and
x mod y = x - y * (x div y).sqrt(x)x.sin(x), cos(x), tan(x)numeric(x)true if x is a number,
false otherwise.true, falsenot p, p & q, p or q& and or
evaluate only their
left-hand argument if that is enough to determine the result.x : xsx to the beginning of the
list xs as a new first element.head(xs)xs is a non-empty list, the first element
of xs.tail(xs)xs is a non-empty list, the list that contains all
but the first element of xs.xs @ ysxs, followed
by all elements of list ys.reverse(xs)xs, but
in reverse order.length(xs)xs.blanknullnull $ p = p = p $ null
and
null & p = p = p & null
for all pictures p.solid(r, c)c. The ratio width/height of
the picture is the number r.p $ qp beside q. The two
pictures are
scaled relative to each other so that they have the same height.p & qp above q. The two
pictures are scaled relative to each other so that they have the same
width.rot(p)p rotated by anticlockwise by 90°.flip(p)p reflected about the vertical axis.stretch(r, p)p that has been stretched by a scale factor
r in the x direction.
colour(p)p. Some pre-defined
pictures (i.e., the tiles used
in making Escher pictures) have an implicit colour scheme that is linked to
rotations of the tiles. If picture p contains such tiles, then
colour(p) is a picture in which these implicit colours have been
made visible.aspect(p)p.rgb(r, g, b)hsv(h, s, v)man, woman, tree,
starA, B, C, D,
E, Fbend, straightThe following constants and functions are included in the initial state of GeomLab for convenience (so that the definitions do not have to be typed in anew every session. Unlike the other names listed in this document, each of these names can be re-defined by entering a new definition.
rot2(p)p rotated by 180°:
define rot2(p) = rot(rot(p))
rot3(p)p rotated anticlockwise by 270°:
define rot3(p) = rot(rot(rot(p)))
cycle(p)p, assembled in a square pattern:
define cycle(p) = (p $ rot3(p)) & (rot(p) $ rot2(p))
T, UA, B, C and D:
define T = (A $ B) & (C $ D) define U = (A $ rot3(A)) & (rot(A) $ rot2(A))
frame(c, s, p)p with
a frame that has rotated copies of s at the sides and
c at the corners: define frame(c, s, p) =
(c $ rot3(s) $ rot3(c))
& (s $ p $ rot2(s))
& (rot(c) $ rot(s) $ rot2(c))