xxxxxxxxxx
72
function setup() {
createCanvas(400, 400);
}
function draw() {
background(166, 255, 170);
fill(235,232,219);
// Original ellipse
ellipse(270,200,150,60);
// Rotated ellipse
push();
// First translate the point of the original ellipse
translate(198,-90);
// Then rotate
rotate(PI /4);
ellipse(270,200,150,60);
pop();
// Original ellipse
ellipse(130,200,150,60);
// Rotated ellipse
push();
// First translate the point of the original ellipse
translate(198,-90);
// Then rotate
rotate(PI /4);
ellipse(130,200,150,60);
pop();
// Original ellipse
ellipse(200,270,60,150);
// Rotated ellipse
push();
// First translate the point of the original ellipse
translate(198,-90);
// Then rotate
rotate(PI /4);
ellipse(200,270,60,150);
pop();
fill(235,232,219);
// Original ellipse
ellipse(200,130,60,150);
// Rotated ellipse
push();
// First translate the point of the original ellipse
translate(200,-90);
// Then rotate
rotate(PI /4);
ellipse(200,130,60,150);
pop();
fill(255, 200, 48);
ellipse(200,200,60,60);
}