[NEXT] [UP] [PREVIOUS] . [CONTENTS] [INDEX] . [Quick Ref]
Next: Texturing Up: Rayshade User's Guide and Previous: Surface Specification

Transformations

Rayshade supports the application of linear transformations to objects and textures. If more than one transformation is specified, the total resulting transformation is computed and applied.

translate ^delta
Translate (move) by ^delta.

rotate ^axis theta
Rotate counter-clockwise about the given axis by theta degrees.

scale ^v
Scale by ^v.

All three scaling components must be non-zero, else degenerate matrices will result.

transform ^row1 ^row2 ^row3 [^delta]
Apply the given 3-by-3 transformation matrix. If given, ^delta specifies a translation vector.

Transformations should be specified in the order in which they are to be applied immediately following the item to be transformed. For example:

    /*
     * Ellipsoid, rotated cube
     */
    sphere 1. 0 0 0   scale 2. 1. 1. translate 0 0 -2.5
    box 0 0 0 .5 .5 .5
      rotate 0 0 1 45 rotate 1 0 0 45 translate 0 0 2.5

Transformations may also be applied to textures:


    surface red
      diffuse 1 0 0 ambient 1 0 0
    plane 0 0 -4  0 0 1
      texture checker red scale 2 2 2 rotate 0 0 1 45

Note that transformation parameters may be specified using animated expressions, causing the transformations themselves to be animated.


[NEXT] [UP] [PREVIOUS] . [CONTENTS] [INDEX] . [Quick Ref]
Next: Texturing Up: Rayshade User's Guide and Previous: Surface Specification


Jelle van Zeijl (jvzeijl@iso.estec.esa.nl)
Wed Jun 15 16:19:08 MET DST 1994