? "=====================================================================\n",
  " A vine growing more or less upward.  The camera is positioned at the\n",
  " base of the vine looking upward.  The script will require both a lot\n",
  " of memory and time to render!\n",
  "=====================================================================\n";

!
! Setup our camera to point almost upward.
!
 camera'POS = [20,20,0];
 camera'TARGET = [13,13,10];
 camera'RIGHT = [-1,1,0];

 real
  LIGHTNESS = 1.0;

!--------------------------------------------------------------------
!!-------------------------------------------------------------------
!!
!! Surfaces and colors
!!
!!-------------------------------------------------------------------
!--------------------------------------------------------------------

!                            ka   kd   ks    n    km   kr   ri   kb
DULL        : surface(PHONG, 1.0, 1.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0 );
SHINY       : surface(PHONG, 1.0, 0.9, 0.8, 25.0, 0.0, 0.0, 0.0, 0.0, SILVER );
leafsurf    : surface(PHONG, 0.5, 0.4, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, TRANSLUCENT );
flowersurf  : surface(PHONG, 0.9, 0.9, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0 );
trunksurf   : surface(PHONG, 1.0, 1.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0 );
bricksurf   : surface(PHONG, 0.6, 0.9, 0.5, 25.0, 0.0, 0.0, 0.0, 0.0, SILVER );

brown       : color( rgb, [0.40, 0.25, 0.00] );
green       : color( rgb, [0.10, 0.20, 0.05] );
pink        : color( rgb, [0.90, 0.70, 0.70] );

!--------------------------------------------------------------------
!!-------------------------------------------------------------------
!!
!! The Vine...
!!
!!-------------------------------------------------------------------
!--------------------------------------------------------------------

 bark_tm    : texturemap( "bark1.ilbm" );
 leaf_tm    : texturemap( "leaf2.ilbm" );

 bark : texture(plane, bark_tm, CAMERA'POS, [0,1,0], [1,0,0],
     10,10,10, 1,1, SMOOTH7|REPEAT );

 treespec VINE;
  VINE'FLAGS       = PHONG|LEAVES;
  VINE'DROOP       = -0.15;
  VINE'TWIST       = -0.9;
  VINE'BEND        = 0.80;
  VINE'TAPER       = 0.994;
  VINE'GROWLEN     = 3.0;
  VINE'BRANCHODDS  = 0.30;
  VINE'BRANCHANGLE = 0.5;
  VINE'FORKDELAY   = 2;
  VINE'MINFORK     = 0.33;
  VINE'TWIGSIZE    = 0.25;
  VINE'LEAFSIZE    = 0.50;
  VINE'LEAFRADIUS  = 3.5;
  VINE'TRUNKSURF   = trunksurf;
  VINE'TRUNKCOLOR  = bark;
  VINE'LEAFSURF    = leafsurf;
  VINE'LEAFCOLOR   = leaf_tm;

 tree( 10, [0,0,0], 3.9, VINE );



!--------------------------------------------------------------------
!!-------------------------------------------------------------------
!!
!! Sources of light
!!
!!-------------------------------------------------------------------
!--------------------------------------------------------------------

 star( [-80000,-50000,60000], [0.90,0.90,0.90]*LIGHTNESS, 100 );
 star( [ 80000,-50000,10000], [0.50,0.50,0.50]*LIGHTNESS, 100, NOSHADOWS|INVISIBLE );
 ambient( [0,0,10000], [0.4,0.4,0.4]*LIGHTNESS, [0,0,1], 0, 0 );

!--------------------------------------------------------------------
!!-------------------------------------------------------------------
!!
!! Background stuff
!!
!!-------------------------------------------------------------------
!--------------------------------------------------------------------
 vector  SKYHOR = [0.01, 0.01, 0.10] * LIGHTNESS,
         SKYZEN = [0.70, 0.85, 0.90] * LIGHTNESS;

 background( SKY, SKYHOR, SKYZEN, SKYZEN, 3.0 );


!--------------------------------------------------------------------
!!-------------------------------------------------------------------
!!
!! Render command
!!
!!-------------------------------------------------------------------
!--------------------------------------------------------------------
 render;

END
