Computational physics This is an assignment question designe

Computational physics. This is an assignment question designed to be done on Python 3.5. please help me figure out the codes needed to solve this question.

2.2 2) Lissajous figures https en wikipedia.org/wiki/ Lissajous curve In mathematics, a Lissajous curve is the graph of a system of parametric equations A sin(at 8)y B sin (bt) The appearance of the figure is highly sensitive to the ratio a/b. Rational ratios produce closed (connected) or \"still\" figures, while irrational ratios produce figures that appear to rotate. Task 2a: What is the smallest value of t required in theory to produce a closed curve for the parameters a 5, b 6 /2? Use ma tplotlib to generate a good-quality figure containing this curve. Show this curve \"inline\" the Jupyter notebook containing your answers and also save it to a file named \"lissajous pdf\" which you should submit to the D2L Dropbox folder along wi this notebook

Solution

from numpy import sin,pi,linspace from pylab import plot,show,subplot a = [1,3,5,3] # plotting the curves for b = [1,5,7,4] # different values of a/b delta = pi/2 t = linspace(-pi,pi,300) for i in range(0,4): x = sin(a[i] * t + delta) y = sin(b[i] * t) subplot(2,2,i+1) plot(x,y) show()
Computational physics. This is an assignment question designed to be done on Python 3.5. please help me figure out the codes needed to solve this question. 2.2

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site