? "================================================================\n",
  " A squadron of f15 fighter jets flying over a fractal landscape.\n",
  " The camera is attached to and follows the aircraft...\n",
  "================================================================\n";

WHITE   : COLOR( RGB, [1.0, 1.0, 1.0] );
DKGRAY  : COLOR( RGB, [0.5, 0.5, 0.5] );
BLUE    : COLOR( RGB, [0.1, 0.0, 0.3] );
GREEN   : COLOR( RGB, [0.0, 0.4, 0.1] );
orange  : COLOR( RGB, [1.0, 0.7, 0.1] );


!                           ka   kd   ks    n    km   kr   ri   kb
SHINY    : surface( PHONG, 0.3, 0.8, 0.9, 16.0, 0.0, 0.0, 0.0, 0.0, 0 );
ROCK     : surface( PHONG, 0.3, 1.0, 0.2,  8.0, 0.0, 0.0, 0.0, 0.0, 0 );
DULL     : surface( PHONG, 0.5, 1.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0 );

grass_tm : texturemap( "grass.ilbm" ); 

vector  squadron_angle;
  real lightness = 1.0;


!-------------------------------------------------------------------
!!
!! Object to import...
!!
!-------------------------------------------------------------------
frameloop

  clearscene;

  squadron_position : tween( plane, progress
		$ 0.0, [0,-2500,800] $
		$ 1.0, [0,12000,800] $ );

  if (progress < 0.2) {
    squadron_angle = [0,360,0];
  }
  if (progress >= 0.2 and progress < 0.8) {
    squadron_angle = [0, -360*( cos( ((progress-0.2)/0.6)*180 )+1.0)/2.0, 0];
  }
  if (progress >= 0.8) {
    squadron_angle = [0,0,0];
  }

  outerlimits : object( squadron_position, squadron_angle )
    f15a : import( "f15.bin", [0,500,-60], [20,20,20], [0,0,180], [1,1,1], 0 );
    f15a.color[10] = orange;
    f15b : import( "f15.bin", [200,100,0], [20,20,20], [0,0,180], [1,1,1], 0 );
    f15b.color[10] = orange;
    f15c : import( "f15.bin", [-200,-100,0], [20,20,20], [0,0,180], [1,1,1], 0 );
    f15c.color[10] = orange;
    f15d : import( "f15.bin", [0,-500,60], [20,20,20], [0,0,180], [1,1,1], 0 );
    f15d.color[10] = orange;
    CAMERA'POS     = [-50,-880,150];
    CAMERA'TARGET  = [-50,-600,150];
    CAMERA'RIGHT   = [1,0,0];
  endobject

  grass_tx : texture( plane, grass_tm, [0,0,0],
	   [0,0,1], [1,0,0], 2000,2000,2000, 4,4, REPEAT|SMOOTH5 );

  hills : boundary( [0,7000,0] )
  landscape( 109, 6, 0.1,
    [0,-2000,0], [6000,12000,0], [-6000,12000,0],
      grass_tx, DULL, PHONG|STRAIGHTEDGES );
  endboundary

  replica( hills, [6000,18000,0], [0,0,-120] );
  replica( hills, [-7000,19000,0], [0,0,120] );

  polygon( @[6000,12000,0], @[-6000,12000,0],
    @[-80000,120000,0], @[80000,120000,0],
    grass_tx, DULL, 0 );


!-------------------------------------------------------------------
!!
!! Lighting...
!!
!-------------------------------------------------------------------
!  lightness : tween( plane, progress
!		$ 0.0, 0.0 $
!                $ 0.1, 1.0 $
!                $ 0.9, 1.0 $
!                $ 1.0, 0.0 $ );
!  star( [15000, -8000, 15000], [1.0, 1.0, 1.0]*lightness, 1000 );
  infinite( [-1,1,-1], [1,1,1] );

  ambient( [0,0,10000], [0.6,0.7,0.7]*lightness, [0,0,1], 0.0, 0.0 );

!-------------------------------------------------------------------
!!
!! Ground and background...
!!
!-------------------------------------------------------------------
!  background( PLAIN, [0,0,0] );
  background( SKY, [0.8,0.8,0.8], [0.1,0.1,0.5], [0.8,0.8,0.8], 0.8 );
  sethaze( background, 1000000, 20000, 20000, 0.8, 0, 1 );


!-------------------------------------------------------------------
!!
!! 
!!
!-------------------------------------------------------------------
!  CAMERA'POS     = [0,2000-PROGRESS*4000,600];
!  CAMERA'TARGET  = CAMERA'POS + [0,100,0];

  RENDER;

nextframe

end
