!---------------------------------------------------------------
!
! TUTORIAL17 - RayDance tutorial script #17.
!
! This script imports an object.
!
! Concepts include :
!
!  o Using the IMPORT statement.
!
!  o Altering colors in a videoscape object.
!
!---------------------------------------------------------------

! Use a print statement to display descriptive text on the
! message window.


? "TUTORIAL17 - This script loads three instances of a\n",
  "VideoScape format object.  Each instance is then colored\n",
  "with a different color\n";


! Create colors for our objects

WHITE  : color(RGB, [1,1,1] );
DKGRAY : color(RGB, [.5,.5,.5] );
RED    : color(RGB, [1,0,0] );
GREEN  : color(RGB, [0,1,0] );
BLUE   : color(RGB, [0,0,1] );


! Replace body color of fiter craft with red, green, and blue
! Body color is 15.  The struts were color 14 and they're
! replaced with dkgray.

fiter1 : import( "fiter2.geo", [-15,0,0], [1,1,1], [0,0,90], [1,1,1], 0 );
fiter1.color[14] = DKGRAY;
fiter1.color[15] = RED;

fiter2 : import( "fiter2.geo", [ 0,0,0], [1,1,1], [0,0,90], [1,1,1], 0 );
fiter2.color[14] = DKGRAY;
fiter2.color[15] = GREEN;

fiter3 : import( "fiter2.geo", [ 15,0,0], [1,1,1], [0,0,90], [1,1,1], 0 );
fiter3.color[14] = DKGRAY;
fiter3.color[15] = BLUE;

! Specify the ambient light.

!       always 0's  lamp color   dir.    k1  k2

ambient( [0,0,0], [0.6,0.6,0.6], [0,0,1], 0, 0 );


! Specify the STAR light.

!         position        lamp color rad  flags

star( [3000,-30000,40000], [1,.9,1], 300, NOSHADOWS );


! Set the background color to a dark orange

BACKGROUND( PLAIN, [.15,.05,0] );


! The camera will be positioned along the negative y axis aiming
! toward the central objects

CAMERA'POS = [0,-100,200]*0.3;
CAMERA'TARGET = [0,0,0];


! The scene has now been constructed, render it!

RENDER;


! All scripts must terminate with an END

END
