   const childY = cy + Math.sin(angle) * childRadius;
                drawPattern(childX, childY, childRadius, level - 1);
            }
        }

        function redraw() {
            ctx.clearRect(0, 0, canvas.width, canvas.height);
            const complexity = parseInt(complexitySlider.value);
            drawPattern(400, 400, 350, complexity);
        }

        redrawBtn.addEventListener('click', redraw);
        complexitySlider.addEventListener('input', () => {
            complexityValue.textCo