Exercise: Harmonographs

In this exercise, you will solve tasks related to harmonographs.

Task 1

As discussed in the previous lesson, below is the equation for a damped pendulum:

x(t)=Asin(2πft+p)edtx(t) =Asin(2\pi ft+p)e^{dt}

Problem Statement

Write a Python function named pendulum() to implement the equation given above. Use the following default values for the parameters:

  • A=1A=1
  • f=100f=100
  • p=0p=0
  • d=0.05d=0.05

Use the following arguments to plot the output of the function against tt:

  • A=1A=1
  • f=2f=2
  • p=0p=0
  • d=0.5d=0.5

Set the range of tt to be the following:

0t<2π0\leq t<2\pi

Use all the suitable packages that you have learned throughout the course.

Get hands-on with 1200+ tech skills courses.