{
replay;
const context = DOM.context2d(width, height);
context.translate(width / 2, height / 2);
const n = 92;
const points = [];
for (let i = 0; i < n; ++i) {
const p = coordsFromDeg(i * (360 / n), 300);
points.push(p);
}
const lines = [];
const times = [];
const signs = [];
for (let i = 0; i < n / 2; ++i) {
const l = [points[i], points[n / 2 + i]];
times.push(0);
signs.push(1);
lines.push(l);
}
yield context.canvas;
let numL = 0;
let t = 0;
while (true) {
await Promises.delay(10);
context.clearRect(-width / 2, -height / 2, width, height);
for (let i = 0; i <= numL; ++i) {
line(...lines[i], context, { color: 'rgba(100,100,100,0.3)' });
const q = pointOnLine(lines[i], times[i]);
circle([...q, 3], context);
times[i] += signs[i] * 0.0033;
if (times[i] < 0 || times[i] > 1) signs[i] *= -1;
}
if (numL < lines.length - 1 && t % 20 === 19) {
numL++;
}
t++;
}
}