> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://studio.sketchpad.cc/sp/pad/view/ro.XND2fqlMDIy/rev.1753
 * 
 * authors: 
 *   Benjamin Y

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



// Pressing Control-R will render this sketch.

int i = -1000; 
int mercuryAngle = random(0,TWO_PI);
int venusAngle = random(0,TWO_PI);
int earthAngle = random(0,TWO_PI);
int marsAngle = random(0,TWO_PI);
int jupiterAngle = random(0,TWO_PI);
int saturnAngle = random(0,TWO_PI);
int uranusAngle = random(0,TWO_PI);
int neptuneAngle = random(0,TWO_PI);
int moonAngle = random(0,TWO_PI);
int sunPos = 500;
int[][] starpos = [];
for(i=0;i<1000;i++){
    append(starpos,[random(0,1000),random(0,1000)]);
}
int[][] astpos = [];
for(i=0;i<1000;i++){
    append(astpos,[random(0,TWO_PI),random(260,340)]);
}
noStroke();

void setup() {  // this is run once.   
    
    // set the background color
    background(0);
    
    // canvas size (Variable aren't evaluated. Integers only, please.)
    size(1000,1000); 
      
    // smooth edges
    smooth();
    
    // limit the number of frames per second
    frameRate(200);
    
    // set the width of the line. 
    strokeWeight(1);
} 

void draw() {  // this is run repeatedly. 
    background(0); 
    stroke(255);
    fill(255);
    text("Time",10,50);
    text("M. Year",10,70);
    text("V. Year",10,90);
    text("E. Year",10,110);
    text("M. Year",10,130);
    text("J. Year",10,150);
    text("S. Year",10,170);
    text("U. Year",10,190);
    text("N. Year",10,210);
    text("M. Day",140,70);
    text("V. Day",140,90);
    text("E. Day",140,110);
    text("M. Day",140,130);
    text("J. Day",140,150);
    text("S. Day",140,170);
    text("U. Day",140,190);
    text("N. Day",140,210);

    text(i-1000,100,50);
    text((i-1000)/59.6250,230,70);
    text((i-1000)/116.875,230,90);
    text((i-1000)/1.00001,230,110);
    text((i-1000)/1.02778,230,130);
    text((i-1000)/0.41667,230,150);
    text((i-1000)/0.43750,230,170);
    text((i-1000)/0.71875,230,190);
    text((i-1000)/0.66875,230,210);
    
    text((i-1000)/87.9691,100,70);
    text((i-1000)/224.701,100,90);
    text((i-1000)/365.256363004,100,110);
    text((i-1000)/686.971,100,130);
    text((i-1000)/4332.64,100,150);
    text((i-1000)/10739.5,100,170);
    text((i-1000)/30689.3,100,190);
    text((i-1000)/60190,100,210);
    for (int[] j:starpos) {
        point(j[0],j[1]);
    }
    fill(153);
    noStroke();
    //for (int[] j:astpos) {
    //    ellipse(sin(j[0])*j[i]+sunPos,cos(j[0])*j[i]+sunPos,4,4);
    //}
    noStroke();
    
    
    
    
    mercuryAngle += TWO_PI/87.9691;
    venusAngle -= TWO_PI/224.701;
    earthAngle += TWO_PI/365.256363004;
    marsAngle += TWO_PI/686.971;
    jupiterAngle += TWO_PI/4332.64;
    saturnAngle += TWO_PI/10739.5;
    uranusAngle += TWO_PI/30689.3;
    neptuneAngle += TWO_PI/60190;
    
    
    
    
    
    
    
    
    
    
    fill(255,255,  0);
    ellipse(sunPos,sunPos,35,35);
    fill(204,204,204);
    ellipse(cos(mercuryAngle)*50+sunPos,sin(mercuryAngle)*50+sunPos,5,5);
    fill(255,255, 10);
    ellipse(cos(venusAngle)*70+sunPos,sin(venusAngle)*70+sunPos,10,10);
    fill(102,102,255);
    ellipse(cos(earthAngle)*100+sunPos,sin(earthAngle)*100+sunPos,10,10);
    fill(255, 51,  0);
    ellipse(cos(marsAngle)*140+sunPos,sin(marsAngle)*140+sunPos,10,10);
    fill(255,102,  0);
    ellipse(cos(jupiterAngle)*220+sunPos,sin(jupiterAngle)*220+sunPos,45,45);
    fill(255,204,  0);
    ellipse(cos(saturnAngle)*310+sunPos,sin(saturnAngle)*310+sunPos,40,40);
    fill(102,153,255);
    ellipse(cos(uranusAngle)*390+sunPos,sin(uranusAngle)*390+sunPos,30,30);
    fill(  0,  0,255);
    ellipse(cos(neptuneAngle)*490+sunPos,sin(neptuneAngle)*490+sunPos,30,30);
    // move over a pixel
    i++;
}