If a particular parameter is not specified in the parameter list, a reasonable default value is used.
For example, the camera gop has the following definition.
(camera name type paramlist)
The camera gop requires two parameters, the name of the camera and the camera type (e.g. "perspective"). The "perspective" camera has several options which can be set in the parameter list including the position ("from"), the point that the camera is looking at ("to"), and the field of view ("fov"). These options all have values by default, but different values can be set using the parameter list syntax. The examples below show valid usages of the "perspective" camera gop:
- (camera "main" "perspective")
- (camera "main" "perspective" 'from (vec3 1 1 3))
- (camera "cam2" "perspective" 'to (vec3 0 .5 0) 'from (vec3 1 1 3) 'fov 45)
Vec2, vec3, and vec4 are represented in Scheme using the following notation (x, y, z, and w are reals):
#< x y >
#< x y z >
#< x y z w >
In addition, the following functions construct a new vec2, vec3, or vec4 respectively. x, y, z, and w again are reals.
(vec2 x y)
(vec3 x y z)
(vec4 x y z w)
Therefore, in AL
(vec3 1.0 -2 -.3)
is equivalent to
'#<1.0 -2 -.3>.
Mat3 and mat4 are represented in Scheme using the following notation (each element, aij, is a real):
#< a00 a01 a02 a10 a11 ... a22 >
#< a00 a01 a02 a03 a10 a11 ... a33 >
In addition, the following functions construct a new mat3 or mat4 respectively. Each element, aij, is a real.
(mat3 a00 a01 a02 a10 a11 ... a22)
(mat4 a00 a01 a02 a03 a10 a11 ... a33)
Vec2list, vec3list, and vec4list are homogeneous Scheme lists or vectors containing a sequence of vec2s, vec3s, or vec4s respectively. The following are equivalent vec3lists:
(list #<1.0 2 3.5> #<-1 1.2 4> #<-9 4.3 2>)
(vector #<1.0 2 3.5> #<-1 1.2 4> #<-9 4.3 2>)
A reallist is a homogeneous Scheme list or vector containing a sequence of reals. The following are equivalent reallists:
(list 1.0 -9 3.2 4 17.3)
(vector 1.0 -9 3.2 4 17.3)
An indexlist is a list or vector containing integers or indexlists. Indexlists are most commonly used to specify vertex indicies for polygonal geometry but may have other uses. Example indexlists:
(list 3 3 3 4 3)
(vector 0 1 2 3 4 5)
'((1 2 3 0) (4 5))
'#(#(1 2 3 0) #(4 5))
Last updated: 10/30/96 / Steve May ( smay@cgrg.ohio-state.edu ) Any comments or suggestions appreciated.