rotate

Syntax

  • rotate(mode, coordSystem, xAngle, yAngle, zAngle)

Parameters

  1. modeselector{ abs | rel }—Absolute or relative mode. Absolute means the angles are set to the given value, relative means the angles are added.
  2. coordSystemselector{ scope | pivot | object | world }—Name of the coordinate system in which the following angles are given.
  3. xAnglefloatAngles in degrees to rotate about the x-axis.
  4. yAnglefloatAngles in degrees to rotate about the y-axis.
  5. zAnglefloatAngles in degrees to rotate about the z-axis.

Description

The rotate operation rotates the scope around the scope origin. The angles can be defined in any coordinate system, and the rotation can either be absolute (= set the angles) or relative (= add the angles). This operation manipulates the scope orientation (scope.r attribute).

Examples

Set scope orientation to world coordinate system angles

Using the absolute mode, the scope orientation can be set to an orientation relative to the world origin.
Init--> extrude(10) t('0.2, 0, '0.3) s('0.5, '1, '0.5) rotate(abs, world, 0, 90, 0)
Scope set to world origin

Was this article helpful?