Modify a text file: $/x129DGC.pde
$/x129DGC.pde
//Code for intro to programming //Dynamic sketch float x,y; float sunX, sunY; //// SETUP: Define screen size, set modes. void setup() { size( 400, 400 ); // RESET: // Start the sun half-way across the screen. sunX= width/8; sunY= 80; } void draw() { // SCENE: sky, sun, background( 250, 400, 250 ); // white sky fill( 255, 255, 0 ); ellipse( sunX, sunY, 45,45 ); // Yellow sun fill( 255, 0, 0 ); if (sunX > width) { sunX= 0; } sunX= sunX + 4;