xxxxxxxxxx
32
i = 0;
gap = 0.1;
function setup() {
createCanvas(700, 700);
strokeWeight(1);
background(248);
}
function draw() {
translate(width / 2, height / 2);
rR = random(0, 255);
rG = random(0, 255);
rB = random(0, 255);
stroke(rR, rG, rB);
var radius = 300;
var angle = TAU / 100;
var x = tan(angle * i) * radius;
var y = sin(angle * i) * radius;
i = i + gap;
line(0, 0, x, y);
line(0, 0, y, x);
line(50, 50, x, y);
line(50, 50, y, x);
}