The turn command performs a rotation of angle (default 90°) around a specified axis (default y) at each of a specified number of image update frames (default 1 frame, except infinity if rock is used; can be halted with stop). The angle can be positive or negative. The rock option wags models back and forth around the specified axis with an amplitude of angle in each direction and N frames per cycle, continuing until all frames have elapsed. 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 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. The commands turn and roll are the same except for their default values of angle and frames. See also: cofr, move, zoom, mousemode, making movies
The 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, the screen coordinate system (X horizontal, Y vertical, Z in/out) will be used for the axis and the scene coordinate system for the center when they are given as coordinates (as opposed to an atom-spec).
The axis can be:
The center can be:
If no center is specified, the current center of rotation will be used.
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. To halt an ongoing turn, use stop.