3D_IMAGE_TEXTURE

3D_IMAGE_TEXTURE N1,N2

APPLIES TO THE 3D OBJECT NUMBER N1 THE TEXTURE FROM THE IMAGE OBJECT NUMBER N2

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

ACTION

The command 3D_IMAGE_TEXTURE N1,N2 assigns a texture to the 3D object number N2.

The texture is from the IMAGE object number N2.

SYNTAX: 3D_IMAGE_TEXTURE N1,N2

  • N1 = 3D object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of 3D objects.
  • N2 = IMAGE number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • The command is used to give a texture from an IMAGE to a 3D object.

ERROR

  • If number N1 is not a correct expression.
  • If number N1 exceeds the allowed maximum number of 3D objects.
  • If number N1 is not greater than 0.
  • If 3D object number N1 does not exist.
  • If number N2 is not a correct expression.
  • If number N2 exceeds the allowed maximum number of system objects.
  • If number N2 is not greater than 0.
  • If system object number N2 does not exist.

EXAMPLE

rem draw something

2d_pen_width 3

2d_pen_color 0,0,250

2d_poly_from 10,10

2d_poly_to 20,30

2d_poly_to 40,5

2d_poly_to 40,60

2d_poly_to 60,20

2d_poly_to 100,110

2d_poly_to 150,20

rem grab the drawing

image 2

2d_image_copy 2,0,0,160,160

rem create a 3D world

scene3d 1:full_space 1

rem create a sphere

3d_sphere 1,2

rem give it the drawing as texture

3d_image_texture 1,2

3d_y_rotate 1,90

SEE ALSO

3D_LOAD_OBJECT

IMAGE

2D_IMAGE_COPY

2D_IMAGE_PASTE