Newton's Fractal

Newton's method on f(z) = zn − 1. Each pixel is colored by which root it converges to. Boundaries between basins of attraction reveal infinite fractal complexity.

Double-click to zoom 2× in
Ready — click Render

Double-click anywhere on the canvas to zoom 2× centered on that point.

Algorithm: z ← z − f(z)/f′(z) where f(z) = zⁿ − 1, f′(z) = n·z^(n−1).
Roots of zn = 1 sit at e^(2πik/n) for k = 0…n−1. Convergence threshold: |z − root| < 1e-6 within 50 iterations. Non-converging pixels (|z| > 1e6) shown in white.
P1: n=2 shows a clean vertical boundary — left half converges to root −1, right to +1.
P2: n=5, zoom into any boundary pixel — all 5 colors visible at every scale.