The rock command wags models back and forth around the specified axis (default y) with an amplitude of angle (default 30°) and N frames per cycle (default 136), continuing until all frames (default forever) have elapsed, or the motion is halted with the stop command. Like that of a pendulum, the movement is slower near the turnaround points 1/4 and 3/4 of the way through a cycle.
The commands turn and roll can perform the same motion as the rock command, with a rock option equivalent to the cycle option described here. They differ from rock in their default parameter values. For a figure-eight motion, see wobble. See also: cofr, move, zoom, mousemode , making movies
The axis can be x, y, z or any of the other standard vector specifications.
The angle can be positive or negative.
The center default is the current center of rotation. Alternatively, the center can be given as x,y,z (three values separated by commas only), an atom-spec, or any of the other standard point specifications. If an atom-spec is used, the first model it contains will be used for reference frame pinning unless a coordinateSystem is also given.
A coordinateSystem can be specified by reference model number. If further motions are applied to an ongoing rotation, the center and axis will remain pinned relative to this reference model. If no reference model is given, axis coordinates will be interpreted in the screen coordinate system (X horizontal, Y vertical, Z in/out of screen) and center coordinates in the scene coordinate system.
The rotation applies to the specified models or atoms; if none are specified, the scene will be rotated as a whole. A movement of atoms cannot be undone except with a command that applies the opposite movement to the same atoms (not always easy to construct) or by reopening the original structure.
Commands continue to be processed while the requested motion is in progress. To pause command processing until the motion is finished, use the wait command.