xxxxxxxxxx
47
function setup() {
createCanvas(500, 400);
}
function draw() {
background(0);
planet(10, color(208, 0, 0), color(0, 0, 0), 200, 200, 200);
planet(5, color(255, 286, 8), color(63, 136, 197), 100, 100, 20);
planet(1, color(3, 43, 67), color(3, 43, 67, 120), 300, 100, 100);
planet(10, color(19, 111, 99), color(255, 255, 255, 20), 30, 10, 200);
textSize(50);
fill(255);
text(add(10,10), 200,200);
}
function planet(border, borderColor, fillColor, X, Y, D) {
strokeWeight(border);
stroke(borderColor);
fill(fillColor);
circle(X, Y, D);
}
function add(num1, num2){
return num1 + num2;
}
// strokeWeight(10);
// stroke(208, 0, 0);
// fill(0,0,0);
// circle(200,200,200);
// strokeWeight(5);
// stroke(255, 186, 8);
// fill(63, 136, 197);
// circle(100,100,20);
// strokeWeight(1);
// stroke(3, 43, 67);
// fill(3, 43, 67,120);
// circle(300,100,100);
// strokeWeight(10);
// stroke(19, 111, 99);
// fill(255, 255, 255, 20);
// circle(30, 10, 200);