3D_SCALE

3D_SCALE N,CX,CY,CZ

SHRINKS OR STRETCHES THE 3D OBJECT NUMBER N ALONG ITS AXES

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

ACTION

The command 3D_SCALE N,CX,CY,CZ scales the 3D object designated by its number N, along its own X axis by the coefficient CX, along its own Y axis by the coefficient CY, along its own Z axis by the coefficient CZ.

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

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

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

If CX=1, no scale is made.

If CX>1, the 3D object is stretched on its X axis.

If CX<1, the 3D object is shrinked on its X axis.

If CY=1, no scale is made.

If CY>1, the 3D object is stretched on its Y axis.

If CY<1, the 3D object is shrinked on its Y axis.

If CZ=1, no scale is made.

If CZ>1, the 3D object is stretched on its Z axis.

If CZ<1, the 3D object is shrinked on its Z axis.

SYNTAX: 3D_SCALE N,CX,CY,CZ

  • 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.
  • CX = coefficient. Must be greater than 0.
  • CY = coefficient. Must be greater than 0.
  • CZ = coefficient. Must be greater than 0.

USE

  • The command 3D_SCALE is used to dimension a 3D object on its own axes.

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 the coefficient CX is not a correct expression.
  • If the coefficient CX is less than or equal to 0.
  • If the coefficient CY is not a correct expression.
  • If the coefficient CY is less than or equal to 0.
  • If the coefficient CZ is not a correct expression.
  • If the coefficient CZ is less than or equal to 0.

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 sphere

3d_sphere 1,2

rem wait for 1 second

wait 1000

rem turn it into an ovoid

3d_scale 1,3,0.9,0.9

SEE ALSO

3D_X_SCALE

3D_Y_SCALE

3D_Z_SCALE