Next: transform-incr, Previous: time-interests, Up: GCL Reference

#### 7.2.137 transform

`(transform objetoID centerID frameID [rotate|translate|translate-scaled|scale] x y z [bbox-center|origin] [dt [smooth]])`
  Apply a motion (rotation, translation, scaling) to object `objetoID`; that is, construct and concatenate a transformation matrix with objetoID's transform The 3 IDs involved are the object that moves, the center of motion, and the frame of reference in which to apply the motion. The center is easiest understood for rotations: if centerID is the same as objetoID then it will spin around its own axes; otherwise the moving object will orbit the center object. There is the special keyword `bbox-center` which may be used for `centerID`. As a result the motion will be relative to the center of the bounding box of `objetoID`. Normally frameID, in whose coordinate system the (mouse) motions are interpreted, is `focus`, the current camera. Translations can be scaled proportional to the distance between the target and the center. Support for spherical and hyperbolic as well as Euclidean space is built-in: use the `space` command to change spaces. With type `rotate` x, y, and z are floats specifying angles in RADIANS. For types `translate` and `translate-scaled` x, y, and z are floats specifying distances in the coordinate system of the center object.

  The optional `dt` field allows a simple form of animation; if present, the objeto moves by just that amount during approximately `dt` seconds, then stops. If present and followed by the `smooth` keyword, the movimento is animated with a 3t^2-2t^3 function, so as to start and stop smoothly. If absent, the movimento is applied immediately.