xxxxxxxxxx
let fullRes = 500
function setup() {
createCanvas(fullRes, fullRes);
colorMode(HSB, 360);
background(330);
}
function draw() {
translate(fullRes * 0.5, fullRes * 0.5);
fill(0);
strokeWeight(0.001);
scale(30);
beginShape();
vertex(-0.25, 0);
vertex(0, -0.25);
vertex(0.25, 0);
vertex(0, 0.5);
endShape(CLOSE);
let kiteStrings = 128;
for (let i = 0; i < kiteStrings; i += 1) {
let x = bezierPoint(0, 0, 0, 1, i / kiteStrings);
let y = bezierPoint(0.5, 0, 4, 8, i / kiteStrings);
strokeWeight(map(i, 0, kiteStrings, 0.04, 0));
stroke(0, map(i, 0, kiteStrings, 32, 0));
point(x, y);
if (i > kiteStrings / 8 && i < kiteStrings / 3 && i % 8 === 0) {
beginShape();
vertex(x - 0.1, y - 0.05);
vertex(x + 0.1, y + 0.05);
vertex(x + 0.1, y - 0.05);
vertex(x - 0.1, y + 0.05);
endShape(CLOSE);
}
}
// bezier(0, 0.5, 0, 2, 0, 2, 1, 2);
}