xxxxxxxxxx
let w = 60;
let h = 60;
let g = 90;
function setup() {
createCanvas(559, 397, SVG);
background(255);
rectMode(CENTER);
}
function draw() {
//background(255);
clear();
//g = map (mouseX, 0, width, 25, 200);
translate(30, 47);
for (let y = 0; y < 5; y++) {
for (let x = 0; x < 9; x++) {
push();
let a = map(y, 0, 4, 0.2, 1);
let a1 = map(y, 0, 4, 0, 0.5*PI);// calculate angle
let b = map(x, 0, 21, 0, 50*PI);
let c = map(y, 0, 4, HALF_PI, PI);
let r = map(y, 0, 4, 0, -QUARTER_PI);
let d = map(y, 0, 4, 45, 65)
let w1 = map(x, 0, 8, 60, 0);
let w2 = map(x, 0, 8, 0, 60);
let h1 = map(x, 0, 8, 60, 0,);
let h2 = map(x, 0, 8, 0, 60,);
translate(x * 60, y * d); // translate by xy position plus gridsize g
//rotate(a1);
rotate(QUARTER_PI);
noFill();
stroke(0);
strokeWeight(1.5);
scale(a);
fill(206, 172, 96);
stroke(206, 172, 96);
rotate(PI);
arc(0, 0, w1, h1, 0, HALF_PI, PIE);
rotate(PI);
arc(0, 0, w2, h2, 0, HALF_PI, PIE);
//rotate(r);
noFill();
stroke(0);
arc(0, 0, w, h, 0, HALF_PI, PIE);
rotate(PI);
arc(0, 0, w, h, 0, HALF_PI, PIE);
//rect(0, 0, w, h); // set rect with width height
pop();
}
}
/*
rect(125, height/2, w, h);
rect(200, height/2, w, h);
rect(275, height/2, w, h);
rect(350, height/2, w, h);
rect(425, height/2, w, h);
rect(500, height/2, w, h);
rect(575, height/2, w, h);
rect(650, height/2, w, h);
rect(725, height/2, w, h);
rect(800, height/2, w, h);
*/
}
function mousePressed() {
save("mySVG.svg");
}