An ~easily configurable Python script for animating polar graphs using manim
- manim (Installation Guide)
- LaTeX
To get started, simply edit the polar_equation
function defined near the top of the file. Then, update the label written in LaTeX, and you're done!
You can easily adjust the range for the angles used in the graph by editing the value assigned to polar_function_range
.
And, if your polar graph calls for more or less space on the x and y axes, you can edit function_x_range
and function_y_range
.
- Run
manim -qk polar_graph.py PolarGraph
- Alternatively, run
manim -ql polar_graph.py PolarGraph
for a faster rendering with worse quality - Add the flag
--format=gif
to compile into a gif instead of mp4 (e.g.manim -qk --format=gif polar_graph.py PolarGraph
)
Your initial render will take the longest, manim needs to cache each new LaTeX string, and the theta tracking label in the scene will create a new string for every 10 degrees within your configured range. Luckily, it only needs to do this once, so each subsequent rendering will be much faster!