xxxxxxxxxx
33
let font
function setup() {
createCanvas(500, 500, WEBGL);
}
let DTcount = 0
let baseRadius = 150
let rotateSpeed = 30
let lineCount = 17
let rotation = 0;
let radius
function draw() {
background(10,10,30);
stroke(210,210,230)
DTcount = DTcount + floor(deltaTime * 1000) / 100000000
rotation = DTcount * rotateSpeed
for(let i = 0; i < lineCount; i++){
radius = (baseRadius * abs(sin(rotation*3 + (2*PI/lineCount * (i + 1)))))*0.5 + baseRadius/2
line(sin(rotation + (2*PI/lineCount*(i+1)))*radius,cos(rotation + (2*PI/lineCount*(i+1)))*radius,sin(rotation + PI + (2*PI/lineCount*(i+1)))*radius,cos(rotation + PI + (2*PI/lineCount*(i+1)))*radius)
}
}