Python library for analyzing, exploring, and visualizing epitrochoids and hypotrochoids in just a few lines of code
spyrograph: elegant mathematics and geometries
What is it?
spyrograph is a lightweight Python package that provides an expressive and flexible set of tools for drawing beautiful mathematically driven art. With just a few lines of easy-to-read code you can start analyzing, visualizing, and exploring elegant mathematics
Before we dive into creating and plotting a hypotrochoid, let's make sure we have spyrograph and matplotlib installed
pip3 install spyrograph matplotlib
Creating a hypotrochoid
To create a hypotrochoid, we need to specify the parametersR (radius of the fixed circle), r (radius of the rolling circle), d (distance from the rolling circle), and thetas (a list of theta values)