<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 <a href="https
Step1:  We will need to calculate the LCM of the time periods for the two oscillators. Hence we define the LCM of two integers.
Step2:  The parameters of the oscillators. You need not change anything starting from the time periods.
If the graph is not smooth enough, smoothen it.
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import pylab as pl
Explanation: <a href="https://colab.research.google.com/github/subimal/class-demos/blob/master/LissajousFigures.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
Lissajous figures
Import the required libraies
End of explanation
def gcd(a,b):
  if a<b:
    a,b = b,a
  while b>0:
    a,b=b,a%b
  return a
def lcm(a,b):
  return a*b//gcd(a,b)
Explanation: We will need to calculate the LCM of the time periods for the two oscillators. Hence we define the LCM of two integers.
End of explanation
# amplitudes
A = np.array([1,1])
# frequencies
f = np.array([3,5])
# phased difference
delta = 0*np.pi/4
# time periods
T = 1/f
# the time grid
tmin, tmax = 0, lcm(f[0], f[1])
dt=(tmax-tmin)/2000
t=np.arange(tmin, tmax+dt, dt)
# the oscillations - mutually perpendicular
x = A[0]*np.cos(2*np.pi*f[0]*t )
y = A[1]*np.sin(2*np.pi*f[1]*t+delta)
fig = pl.figure(1, figsize=(7,7))
ax = fig.add_subplot(111)
pl.plot(x,y)
pl.grid('on')
d=1.1*max(A)
pl.xlim((-d, d))
pl.ylim((-d, d))
ax.set_aspect(1)
Explanation: The parameters of the oscillators. You need not change anything starting from the time periods.
If the graph is not smooth enough, smoothen it.
End of explanation
<END_TASK>