let speed_star = 0.1
let _alpha = 30
let aplha_habital = 25
let mercury_x=400;
let mercury_y=400;
let mercury_theta = 47.87;
let mercury_r = 20;
let speed_mercury = 0.04787 * speed_star
let venus_x=400;
let venus_y=400;
let venus_theta = 35.02;
let venus_r = 50;
let speed_venus = -0.03502 * speed_star
let earth_x=400;
let earth_y=400;
let earth_theta = 29.78;
let earth_r = 100;
let speed_earth = -0.02978 * speed_star
let moon_x=400;
let moon_y=400;
let moon_theta = 29.78;
let moon_orb_earth = 2;
let moon_r = 149;
let speed_moon = 0.07978 * speed_star
let mars_x=400;
let mars_y=400;
let mars_theta = 24.077;
let mars_r = 140;
let speed_mars = -0.024077 * speed_star
let jupiter_x=400;
let jupiter_y=400;
let jupiter_theta = 13.07;
let jupiter_r = 250;
let speed_jupiter = -0.01307 * speed_star
let saturn_x=400;
let saturn_y=400;
let saturn_theta = 20;
let saturn_r = 300;
let speed_saturn = -0.00969 * speed_star
let uranus_x=400;
let uranus_y=400;
let uranus_theta = 6.81;
let uranus_r = 350;
let speed_uranus = -0.00681 * speed_star
let neptune_x=400;
let neptune_y=400;
let neptune_theta = 5.43;
let neptune_r = 370;
let speed_neptune = -0.00543 * speed_star
let pluto_x=400;
let pluto_y=400;
let pluto_theta = 25.70;
let pluto_r = 360;
let speed_pluto = -0.0047 * speed_star
let r1 = 165,r2=210;
let x,y,x2,y2;
let asteroid_theta=0;
let testX,testY;
function setup() {
createCanvas(810, 780);
}
function draw() {
background(0);
//background -- stars
randomSeed(500)
for (var j = 0; j <= 500;j++){
fill(random(247, 16),random(255, 201),random(120,255),random(80,150))
circle(random(800),random(800),random(3))
}
fill(1,250,1,aplha_habital);
circle(400,400,300);
fill(0);
circle(400,400,130)
fill(1,250,1,aplha_habital);
circle(400,400,250);
fill(0);
circle(400,400,100)
fill(250,1,1,aplha_habital);
circle(400,400,160);
textSize(20);
fill(252, 186, 3);
text('June is a Creator',10,50);
textSize(20);
strokeWeight(4);
fill(210,210,210)
text('BIG FIREBALL',412.5,400,1);
circle(400,400,25)
noStroke();
mercury_x=+mercury_r*sin(mercury_theta);
mercury_y=+mercury_r*cos(mercury_theta);
text('ALIENS',mercury_x+400,mercury_y+400,1);
stroke(255,165,3,_alpha);
noFill(255);
circle(400,400,40);
noStroke();
fill(255,165,3);
circle(mercury_x+400,mercury_y+400,3);
mercury_theta = mercury_theta + speed_mercury;
//venus
venus_x=+venus_r*cos(venus_theta);
venus_y=+venus_r*sin(venus_theta);
text('ALIENS',venus_x+400,venus_y+400,1);
stroke(255,165,3,_alpha);
noFill(255);
circle(400,400,100);
noStroke();
fill(255,165,3);
circle(venus_x+400,venus_y+400,5);
venus_theta = venus_theta + speed_venus;
//earth
fill(1,200,150);
earth_x=+earth_r*cos(earth_theta);
earth_y=+earth_r*sin(earth_theta);
text('US',earth_x+400,earth_y+400,1);
stroke(1,200,150,_alpha);
noFill(255);
circle(400,400,200);
noStroke();
fill(1,200,150);
circle(earth_x+400,earth_y+400,5.5);
earth_theta = earth_theta + speed_earth;
//moon
fill(200,200,200);
moon_x=+moon_r*sin(moon_theta)/15;
moon_y=+moon_r*cos(moon_theta)/15;
text('MOONMAN',earth_x+400+moon_x,earth_y+400+moon_y,1);
circle(earth_x+400+moon_x,earth_y+400+moon_y,3);
moon_theta = moon_theta + speed_moon;
//mars
fill(200,200,5);
mars_x=+mars_r*cos(mars_theta);
mars_y=+mars_r*sin(mars_theta);
text('ALIENS',mars_x+400,mars_y+400,1);
stroke(200,200,5,_alpha);
noFill(255);
circle(400,400,280);
noStroke();
fill(200,200,5);
circle(mars_x+400,mars_y+400,4.5);
mars_theta = mars_theta + speed_mars;
//jupiter
fill(255,165,150);
jupiter_x=+jupiter_r*cos(jupiter_theta);
jupiter_y=+jupiter_r*sin(jupiter_theta);
text('BIG GASSY',jupiter_x+407.5,jupiter_y+400,1);
stroke(255,165,150,_alpha);
noFill(255);
circle(400,400,500);
noStroke();
fill(255,165,150);
circle(jupiter_x+400,jupiter_y+400,15);
jupiter_theta = jupiter_theta + speed_jupiter;
//saturn
fill(220,180,130);
saturn_x=+saturn_r*cos(saturn_theta);
saturn_y=+saturn_r*sin(saturn_theta);
text('HULAHOOP',saturn_x+407.5,saturn_y+400,1);
stroke(220,180,130,_alpha);
noFill(255);
circle(400,400,600);
noStroke();
fill(220,180,130);
circle(saturn_x+400,saturn_y+400,15);
fill(240,240,203);
ellipse(saturn_x+400,saturn_y+400,25,4);
saturn_theta = saturn_theta + speed_saturn;
//uranus
fill(50,100,150);
uranus_x=+uranus_r*cos(uranus_theta);
uranus_y=+uranus_r*sin(uranus_theta);
text('ALIENS',uranus_x+400,uranus_y+400,1);
stroke(50,100,150,_alpha);
noFill();
circle(400,400,700);
noStroke();
fill(50,100,150);
circle(uranus_x+400,uranus_y+400,5);
uranus_theta = uranus_theta + speed_uranus;
//neptune
neptune_x=+neptune_r*cos(neptune_theta);
neptune_y=+neptune_r*sin(neptune_theta);
text('ALIENS',neptune_x+400,neptune_y+400,1);
stroke(50,100,200,_alpha);
noFill(255);
circle(400,400,740);
noStroke();
fill(50,100,200);
circle(neptune_x+400,neptune_y+400,2.8);
neptune_theta = neptune_theta + speed_neptune;
//pluo
pluto_x=+pluto_r*cos(pluto_theta)*1.10;
pluto_y=+pluto_r*sin(pluto_theta)*1.05;
text('FUNSIZE',pluto_x+400,pluto_y+380,1);
stroke(210,210,210,_alpha);
noFill(255)
ellipse(400,380,790,756)
noStroke();
fill(230,230,230);
circle(pluto_x+400,pluto_y+380,1.7);
pluto_theta = pluto_theta + speed_pluto;
//asteroid belt
fill(210,230,200,100);
noStroke();
randomSeed(3000);
translate(width / 2, height / 2);
rotate(asteroid_theta);
for(var a = 0;a<3000;a++){
testX = random(width) - width/2;
testY = random(height) - height/2;
if(pow(testX,2)+ pow(testY,2)< pow(r2,2) &&(pow(testX,2)+ pow(testY,2)> pow(r1,2))) {
fill(255);
circle(testX,testY,random(3));
}
asteroid_theta -= 0.000005 * speed_star
}
}