{
replay;
const context = DOM.context2d(width, height);
context.translate(width / 2, height / 2);
let t = 0;
const trace = [];
while (true) {
await Promises.delay(10);
t += 0.5;
context.clearRect(-width / 2, -height / 2, width, height);
const l1 = lineThrough(p2, orientation ? t : -t, context, {
color: 'rgba(100,100,100,0.6)'
});
const n = 9;
for (let i = 0; i < n; ++i) {
const l_i = lineThrough(p1, t + i * (360 / n), context, {
color: 'rgba(100,100,100,0.6)'
});
const intersection = intersectionLL(l1, l_i);
if (intersection && trace.length < n * 370) {
trace.push(intersection);
circle([...intersection, 3], context, { color: 'red' });
}
}
for (let p of trace) {
circle([...p, 2], context, { color: 'red' });
}
circle([...p1, 4.5], context, { color: 'black' });
circle([...p2, 4.5], context, { color: 'black' });
yield context.canvas;
}
}