Written in Python, Manim is an animation engine for creating beautiful explanatory math videos. It was originally created by Grant Sanderson of 3Blue1Brown. Today, Manim has a community version called ManimCE. Articles posted in here are more of the community version of Manim.

manim_logo.png

 

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. 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.