Cycloidal Curves: Theory, Parametric Equations, and Animation

The purpose of this post is to systematically derive the corresponding parametric equations and implement them in Python for visualization using Manim and Matplotlib. The goal is not only to understand these curves analytically but also to see them come alive through animation.

cardioid_fixed_visible_800px.gif
Cardioid ($r = R$), a special case of the epicycloid.

 

Spherical Zone with Manim

The sphere is of radius 4 units, it is hardcoded to the parametric equations. The parametric equations are as follows:

  • $x = r \cos \theta \sin \varphi$
  • $y = r \cos \theta \cos \varphi$
  • $z = r \cos \varphi$

If you check the code, you can see that the latitude and longitude of the sphere are reoriented. The reason is for the sphere to fit the Manim's camera settings.

The orientation of the camera was done by trial and error until I found a view that I wanted.