xxxxxxxxxx
23
let i = 2;
let c;
function setup() {
createCanvas(400, 400);
//frameRate(1);
background(255);
c = createVector(width / 2, height / 2);
}
function draw() {
//background(255,50);
translate(c.x, c.y);
stroke(0);
strokeWeight(2);
let digit = pi.charAt(i);
let p = p5.Vector.fromAngle(radians(360 * digit / 9), 10);
line(0, 0, p.x, p.y);
c.add(p);
i++;
if (i > 100) noLoop();
}