// Clear canvas before drawing new frame ctx.clearRect(0, 0, 800, 600); // Draw central circle - current state pulse += 0.1; if (pulse > Math.PI * 2) pulse -= Math.PI * 2; ctx.beginPath(); ctx.arc(400 + Math.cos(pulse) * radius * 3, 400 + Math.sin(pulse) * radius * 3, radius, 0, Math.PI * 2); ctx.fill(); // Draw orbital circles - aspects of rituals orbits.forEach((orbit, i) => { const angle = (Math.PI * 2 * i) / orbits.length; ctx.beginPath(); ctx.arc(400 + Math.cos(angle) * orbit.radius, 400 + Math.sin(angle) * orbit.radius, 10, 0, Math.PI * 2); ctx.fillStyle = orbit.color; ctx.fill(); // Draw connection lines connections.forEach(conn => { const x1 = 400 + Math.cos(pulse) * radius * 3; const y1 = 400 + Math.sin(pulse) * radius * 3; const x2 = 400 + Math.cos(angle) * orbit.radius; const y2 = 400 + Math.sin