Skip to content

brandonrdug/polar-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

polar-graph

An ~easily configurable Python script for animating polar graphs using manim

Polar Graph of $r = cos(4 \theta)$

Prerequisites

Configuring

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.

Rendering

  • 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!

About

A manim script for rendering animations of polar graphs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages