Slow down "speed" to see when eⁱᶻ =-1 It's at the point where z = π eⁱᵖⁱ = -1 is called Euler's Identity See code & "notes and credits" for explanation
An odd & even series computes numbers that look just like a sine & cosine function (so can draw the circle). Odd power series = z - z³/3! + z⁵)/5! - z⁷)/7! ... Even power series = 1 - z²/2! + z⁴)/4! - z⁶)/6! ... Odd series converges to sin(z) Even series converges to cos(z) eᶻ = 1 + z + z²/2! + z³/3! + + z⁴)/4! + z⁵)/5! + z⁶)/6! +... eⁱᶻ = 1 + iz + (iz)²/2! + (iz)³/3! + + (iz)⁴)/4! + (iz)⁵)/5! +... e or ℯ is "Euler's number" i is an imaginary number, the square root of -1 So, since i² = -1, i³ = -i, i⁴ = 1, i⁵ = i, z⁶ = -1 ... eⁱᶻ = cos(z) + isine(z) so eⁱᵖⁱ = -1 e^iπ = -1 where z = pi or π The power series are called "Maclaurin series". I used just the first few terms to get a fairly accurate estimate of sine(z) and cosine(z). Setting the x coordinate to equal the odd series output, and y coordinate to the even series output, makes a circle. Increasing angle creates a circling motion. Footnote: could code series with repeats, based on: cos(z) =∞∑n=0 (−1)nz2n(2n)! sin(z) =∞∑n=0 (−1)nz2n+1 (2n+1)! but it seemed clearer and easier to code as I did