/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.GpLU0iXF85i/rev.3623
*
* authors:
*
* Benjamin Y
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
void setup() {
//int meurcuryAngle = 0;
//double mercuryAngle = 0.0;
}
double mercuryAngle = random(0, TWO_PI);
double venusAngle = random(0, TWO_PI);
double earthAngle = random(0, TWO_PI);
double marsAngle = random(0, TWO_PI);
double earthMoonAngle = random(0, TWO_PI);
double jupiterAngle = random(0, TWO_PI);
double saturnAngle = random(0, TWO_PI);
double uranusAngle = random(0, TWO_PI);
double neptuneAngle = random(0, TWO_PI);
double plutoAngle = random(0, TWO_PI);
double sunspot1Angle = random(0, TWO_PI);
double sunspot2Angle = random(0, TWO_PI);
double halleyAngle = random(0, TWO_PI);
double days = 0;
int sunXY = 500;
void draw() {
background(0);
noStroke();
size(1000, 1000);
fill(20, 20, 20);
ellipse(sunXY, sunXY, 1000*2, 1000*2);
fill(0, 0, 0);
ellipse(sunXY, sunXY, 491*2, 482*2);
fill(255, 255, 255);
textSize(30);
text("Welcome to Solar System 6.0.orbit! ", 300, 100);
textSize(12);
text("Time Info", 20, 20);
text("| Earth Days Completed: "+int(days/6.75), 40, 40);
text("| Earth Weeks Completed: "+int(days/6.75/7), 40, 60);
text("| Earth Years Completed: "+int(days/365.24/6.75), 40, 80);
text("| Earth Centuries Completed: "+int(days/365.24/6.75/100), 40, 100);
text("---", 40, 120);
for(int i = 0; i <= 1000; i++){
double size = random(0, 2);
ellipse(random(0, 1000), random(0, 1000), size, size);
}
if(random(0, 10) == 0){
fill(random(0, 255),random(0, 255),random(0, 255));
ellipse(random(0, 1000), random(0, 1000), 10, 10);
}
text("SHOW LABEL", 300, 150);
text("HIDE LABEL", 350, 150);
fill(40, 40, 40);
ellipse(sunXY, sunXY, 181*2, 189*2);
fill(10, 10, 0);
ellipse(sunXY, sunXY, 92*2, 99*2);
fill(21, 21, 0);
ellipse(sunXY, sunXY, 58*2, 58*2);
fill(34, 34, 0);
ellipse(sunXY, sunXY, 42*2, 42*2);
fill(50, 50, 0);
ellipse(sunXY, sunXY, 29*2, 29*2);
fill(124, 124, 0);
ellipse(sunXY, sunXY, 25*2, 25*2);
fill(255, 255, 0);
ellipse(sunXY, sunXY, 40, 40);
fill(58, 58, 11);
ellipse(sunXY, sunXY, 1, 1);
mercuryAngle += 0.14;
venusAngle -= 0.07;
earthAngle += 0.035;
marsAngle += 0.0145001;
earthMoonAngle += 0.26;
jupiterAngle += 0.00497;
saturnAngle += 0.00218;
uranusAngle += 0.00118;
neptuneAngle += 0.000487202;
plutoAngle += 0.000487201;
halleyAngle += 0.119119;
days += 365.24*0.035;
//text(10.2, 200, 70);
fill(201, 201, 201);
ellipse(sunXY+41*cos(mercuryAngle), sunXY+46*sin(mercuryAngle), 4, 4);
text("mercury",sunXY+41*cos(mercuryAngle),sunXY+46*sin(mercuryAngle));
fill(128, 128, 0);
ellipse(sunXY+56*cos(venusAngle), sunXY+56*sin(venusAngle), 6, 6);
text("venus",sunXY+56*cos(venusAngle),sunXY+56*sin(venusAngle));
fill(0, 109, 255);
ellipse(sunXY+70*cos(earthAngle), sunXY+73*sin(earthAngle), 6.001, 6.001);
text("earth",sunXY+70*cos(earthAngle),sunXY+73*sin(earthAngle));
fill(200, 0, 0);
ellipse(sunXY+104*cos(marsAngle), sunXY+98*sin(marsAngle), 5, 5);
text("mars",sunXY+104*cos(marsAngle),sunXY+98*sin(marsAngle));
fill(100, 100, 100);
ellipse((sunXY+70*cos(earthAngle))+8*cos(earthMoonAngle), (sunXY+73*sin(earthAngle))+8.29*sin(earthMoonAngle), 3.5, 3.5);
fill(200, 93, 29);
ellipse(sunXY+174*cos(jupiterAngle), sunXY+189*sin(jupiterAngle), 19, 19);
text("jupiter",sunXY+174*cos(jupiterAngle)+9,sunXY+189*sin(jupiterAngle));
fill(200, 143, 0);
ellipse(sunXY+213*cos(saturnAngle), sunXY+249*sin(saturnAngle), 18, 18);
text("saturn",sunXY+213*cos(saturnAngle)+8.5,sunXY+249*sin(saturnAngle));
fill(151, 200, 255);
ellipse(sunXY+357*cos(uranusAngle), sunXY+387*sin(uranusAngle), 13, 13);
text("uranus",sunXY+357*cos(uranusAngle)+6.5,sunXY+387*sin(uranusAngle));
fill(0, 0, 200);
ellipse(sunXY+468*cos(neptuneAngle), sunXY+421*sin(neptuneAngle), 11, 11);
text("neptune",sunXY+468*cos(neptuneAngle)+6,sunXY+421*sin(neptuneAngle));
fill(151, 151, 151);
ellipse(sunXY+498*cos(plutoAngle), sunXY+418*sin(plutoAngle), 3.6, 3.6);
text("pluto",sunXY+498*cos(plutoAngle),sunXY+418*sin(plutoAngle));
fill(255, 255, 212);
ellipse((sunXY-100)+125*cos(halleyAngle), sunXY+89*sin(halleyAngle), 3, 3);
text("halley's comet",(sunXY-90)+125*cos(halleyAngle),sunXY+89*sin(halleyAngle));
}
/*fill(0, 0, 0);
ellipse((sunXY-90)125*cos(sunspot1Angle), sunXY+random(0, 40)*sin(sunspot1Angle), 5, 5);*/
//ellipse(sunXY, sunXY, 5, 5);