3D_Z_ROTATE

3D_Z_ROTATE N,Z

ROTATES THE 3D OBJECT NUMBER N OF Z DEGREES AROUND ITS Z AXIS

  • Type: Command
  • Parameters: 2
  • Group: 3D Objects

ACTION

The command 3D_Z_ROTATE N,Z turns the 3D object designated by its number N, of an angle of Z degrees, around its own Z axis, in relation to its initial position.

The own Z axis of the 3D object is the axis of object which was parallel to the 3D world Z axis when the 3D object was created.

The pointing direction of the 3D object number N is changed.

Recall: at creation, the pointing direction of a 3D object is the vector (0,0,1). The pointing direction is changed by the rotation commands on the 3D object: 3D_X_ROTATE, 3D_Y_ROTATE, 3D_Z_ROTATE and by the pointing at a 3D object command: 3D_POINT_OBJECT.

SYNTAX: 3D_Z_ROTATE N,Z

  • N = 3D object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of 3D objects.
  • Z = rotation angle value (integer or real) expressed in degrees.

USE

  • The command 3D_Z_ROTATE is used to rotate a 3D object around its own Z axis.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of 3D objects.
  • If number N is not greater than 0.
  • If 3D object number N does not exist.
  • If angle Z is not a correct expression.

EXAMPLE

rem create a 3D world

scene3d 1

rem resize the 3D world

width 1,300:height 1,300

rem place the camera

cam_position 5,10,10

rem create a cube

3d_cube 1,1.5

rem wait for 1 second

wait 1000

rem rotate it of 45 degrees around its own z axis

3d_z_rotate 1,45

SEE ALSO

3D_X_ROTATE

3D_Y_ROTATE