{
const ct = canvas.ct;
ct.clearRect(0, 0, WIDTH, HEIGHT);
ct.beginPath();
ct.arc(cx, cy, 5, 0, 7);
ct.fillStyle = "blue";
ct.fill();
ct.beginPath();
ct.moveTo(0, HEIGHT - DIRECTRIX_Y);
ct.lineTo(WIDTH, HEIGHT - DIRECTRIX_Y);
ct.lineWidth = 1;
ct.strokeStyle = "blue";
ct.stroke();
ct.beginPath();
ct.arc(cx, cy, radius, 0, 7);
ct.moveTo(0, line_y);
ct.lineTo(WIDTH, line_y);
ct.strokeStyle = "#666";
ct.lineWidth = 1;
ct.stroke();
if (!isNaN(θ)) {
ct.beginPath();
ct.ellipse(
cx, ellipse_cy,
ellipse_rx, ellipse_ry,
0, Math.PI/2 - θ, Math.PI/2 + θ);
ct.lineWidth = 3;
ct.strokeStyle = "red";
ct.stroke();
}
if (!isNaN(px)) {
ct.beginPath();
ct.arc(cx - px, line_y, 4, 0, 7);
ct.arc(cx + px, line_y, 4, 0, 7);
ct.fillStyle = "#000";
ct.fill();
}
return this || md`# The main drawing function`;
}