Cycloid Curve

Introduction

A cycloid curve is the path traced by a fixed point on the circumference of a circle as it rolls along a straight line without slipping, essentially creating a wave-like pattern with distinct cusps; it's a specific type of curve in geometry often described using parametric equations based on the circle's radius and rolling angle. (Wikipedia)

Brachistochrone curve: The cycloid is the curve of fastest descent for an object under gravity, known as the brachistochrone curve. (Wikipedia)

Tautochrone curve: The time taken for an object to roll down a cycloid is independent of its starting position, making it a tautochrone curve. (Wikipedia)

Problem #1

You have a light attached to the rim of a bicycle wheel. The path of the light as the bike moves traces out a cycloid curve.

Plot the cycloid curve for at least two rotations (720 degrees).

The parametric equations for a cycloid curve is:
x = r(θ - sin(θ)) y = r(1 - cos(θ))

Where "r" is the radius of the rolling circle and "θ" is the angle of rotation.

Note: You must convert degrees to radians to use the Python sin and cos functions. (See the Python "math" module documentation.)

Use matplotlib.pyplot.
For a simple plot example click HERE .
For more plot examples click HERE .

Project #2

The same as Project #1 except use graphics.py. Click HERE for more information.