Making a movie from a polynomial
(Episode #T1)
Making a movie from a polynomial
(Episode #T1)
Ten Minute One-liners for the Curious: https://www.youtube.com/@10minute1liners
In this video, I show how to make a movie that reveals the beauty and complexity of a given polynomial. The language is Octave (or equivalently Matlab) and the goal is a single function with one parameter to be called as the one argument, one-liner polymovie(p). The code can be found at https://www.innovationincrisis.com/10minute1liners/episode-t1 and downloaded here.
References:
Paper link to bi-symmetric log scale: [https://www.researchgate.net/publication/233967063_A_bi-symmetric_log_transformation_for_wide-range_data]
SYMLOG from Matlab Central: [https://www.mathworks.com/matlabcentral/fileexchange/57902-symlog?s_tid=srchtitle_support_results_1_bi-symmetric+log]
Tools:
Matlab R2024b Update 5 (24.2.0.2863752) 64-bit (glnxa64)
GNU Octave, version 10.3.0
-------------------------------------------------------------------------------------------------------------------
The main function is polymovie.m as shown below. There are 18 other support functions, all given in the code available here.
The different scenes in the movie are played out as follows:
2D view
bi-symmetric log scale zooms in on small values and zooms out on large values
Magenta circles are root locations, blue dots are critical points
Reveal of upper complex plane
Green half circle is the unit circle (absolute value of z = 1)
Gives inherent scale to the plot, important to know size of roots
Reveal real part of complex values of p on upper half plane
Surface, Red above zero, blue below zero
Rotation to reveal 3D real surface
Transition to imaginary part of complex values of p
Here magenta is positive, green is negative
Rotation back to reveal 3D imaginary surface
Rotation back again to reveal goth real and imaginary surfaces together
Tip the plot down and look directly from above
Gray the colors and reveal all the zeros and critical points on the upper complex plane
The main code of polymovie is below and works for both Octave and Matlab. There are 18 supporting subfunctions included in the zip file reference above.