3D_LINE

3D_LINE N,X,Y,Z

CREATES A 3D LINE AND GIVES IT THE NUMBER N AS REFERENCE, OR ADDS A POINT TO AN EXISTING 3D LINE

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

ACTION

The command 3D_LINE has 2 possible actions:

- if number N is not used, it creates the first point of a new 3D line in (X,Y,Z) and gives the number N to this 3D LINE.

- if number N is already used for a 3D line, it adds the point (X,Y,Z) to the existing line to create a new segment in the 3D line designated by its number N. The new segment takes the color and the width of the existing 3D line. The center of the 3D line is placed in (0,0,0) : the center of the 3D world (SCENE3D).

The color of the 3D line is black at creation and can be modified by the command 3D_COLOR.

The width of the 3D line is 1 pixel at creation and can be modified by command 3D_LINE_WIDTH.

The 3D line can be moved, rotated, scaled, colored, deleted, hidden, showed... with the appropriated commands.

Remark: by default, the 3D line is created on the first created SCENE3D, but another SCENE3D can be used. For that, create a new SCENE3D, and send it all the commands by 3D_TARGET_IS before creating the 3D line.

SYNTAX: 3D_LINE N,X,Y,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.
  • X = X-component value (integer or real) of the point.
  • Y = Y-component value (integer or real) of the point.
  • Z = Z-component value (integer or real) of the point.

USE

  • The command 3D_LINE is used to create a line or a poly-line in a SCENE3D.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of 3D objects.
  • If number N is less than or equal to 0.
  • If number N is not the number of a 3D_LINE (in the case of adding a point).
  • If X or Y or Z values is not a correct expression.
  • If no SCENE3D is created.

EXAMPLE

rem create a 3D world

scene3d 1

rem create the first point of a 3D line number 1

3d_line 1,0,0,0

rem create the second point of the 3D line number 1

3d_line 1,1,0,0

SEE ALSO

3D_COLOR

3D_DELETE

3D_DELETE_ALL

3D_LINE_WIDTH

3D_HIDE

3D_SHOW

3D_TARGET_IS

3D_X_POSITION

3D_Y_POSITION

3D_Z_POSITION

3D_X_ROTATE

3D_Y_ROTATE

3D_Z_ROTATE

3D_X_SCALE

3D_Y_SCALE

3D_Z_SCALE