xxxxxxxxxx
48
function setup() {
createCanvas(500, 500);
}
function draw() {
background(0)
// planet base
fill(200, 0, 15);
noStroke(200, 0, 15);
ellipse(width * 0.5, height * 0.5, width * 0.25, height * 0.25)
fill(150, 0, 15);
noStroke(200, 0, 15);
ellipse(width * 0.5, height * 0.5, width * 0.2, height * 0.25)
noFill(200, 0, 15);
stroke(100);
ellipse(width * 0.5, height * 0.5, width * 0.25, height * 0.25)
//stars
fill(255)
ellipse(width * 0.1, height * 0.9, width * 0.01, height * 0.01)
ellipse(width * 0.7, height * 0.9, width * 0.01, height * 0.01)
ellipse(width * 0.1, height * 0.1, width * 0.01, height * 0.01)
ellipse(width * 0.8, height * 0.1, width * 0.01, height * 0.01)
ellipse(width * 0.2, height * 0.3, width * 0.01, height * 0.01)
ellipse(width * 0.9, height * 0.7, width * 0.01, height * 0.01)
ellipse(width * 0.5, height * 0.7, width * 0.01, height * 0.01)
ellipse(width * 0.4, height * 0.3, width * 0.01, height * 0.01)
ellipse(width * 0.4, height * 0.15, width * 0.01, height * 0.01)
ellipse(width * 0.7, height * 0.3, width * 0.01, height * 0.01)
ellipse(width * 0.2, height * 0.3, width * 0.01, height * 0.01)
ellipse(width * 0.25, height * 0.8, width * 0.01, height * 0.01)
ellipse(width * 0.25, height * 0.6, width * 0.01, height * 0.01)
ellipse(width * 0.3, height * 0.95, width * 0.01, height * 0.01)
ellipse(width * 0.4, height * 0.85, width * 0.01, height * 0.01)
// white orbit
push()
translate(width/2, height/2);
noFill(200, 0, 15);
stroke(255);
rotate(PI / 15);
ellipse(0,0, width * 0.8, height * 0.2)
pop()
}