import java.awt.*; import java.awt.image.*; import java.applet.AudioClip; import java.net.URL; import graphics.*; public class Final extends ThreeDApplet { AudioClip sound; Animation skyRed, skyGreen, skyBlue; int[][] skyColors = { {229, 133, 42}, //morning orange { 80, 130, 229}, //day blue {229, 133, 42}, //evening orange {100, 0, 125}, //night purple {229, 133, 42} //morning orange again }; //double timeOfDay; //lerp factor for rendering the sky //double DAY_CHANGE_RATE = 0.02; boolean[][] starPos; Bottle unitBottle; Torus unitTorus; Spiral unitSpiral; Sphere unitSphere; Texture noteTexture; //to be mapped on spiral Quad unitQuad; NoiseTexture seaTexture; public void initialize() { super.initialize(); doFog = true; fogAmount = 0.025; //overrideLOD = 0; lights = new Light[1]; lights[0] = new Light(0, 0, 1); lights[0].setColor(255); ambient[0] = ambient[1] = ambient[2] = 30; //change the sky's color over time skyRed = new Animation(skyColors.length); skyGreen = new Animation(skyColors.length); skyBlue = new Animation(skyColors.length); //skyRed.linear = skyGreen.linear = skyBlue.linear = false; //skyRed.looping = skyGreen.looping = skyBlue.looping = false; double transTime = 7.5; //transition time between sky colors for (int i=0; i