// b08 vertical animation test with better stars
// distances in kilometers
//
// Copyright 2009 by Keith Lofstrom
// Available for copying and use under the GPL2 license

#include "colors.inc"
#include "strings.inc"
#include "meter1.inc"
#include "atmosphere.inc"
#include "starmap1.inc"

//#declare time   = clock                                   ;
#declare time   = 1.0 - clock                              ;
#declare CAMALT = (84.0-time*(126.0-42.0*time*time))*KM    ;
#declare SCOLOR = color rgb ( 1.0 - exp( -(CAMALT/ATM) ) ) ;

camera {
   location < 7*KM, REO+CAMALT,  -60*KM >
   look_at  <12*KM, REO+10*KM,   400*KM >
   angle 20
}

// sun 11 degrees north
light_source { <10, 40, -35>*REO White }

object { OceanClouds }
object { ChainBalls }

AllStars(SCOLOR)
