I have an assignment where i have plot two physics equations named them as x and why,
The only unkown is the angle, so i made a loop for the possible angles between 0 and 360
Is there anything wrong with my code?
The only unkown is the angle, so i made a loop for the possible angles between 0 and 360
import math import numpy import matplotlib.pyplot as plt l= 1.5 m= 2.5 g= 9.81 d= 2.7 k= 9.08 alpha = 0 while (alpha<360): alpha = alpha + 1 angles = math.radians(alpha) x = 1-((2*l)/d)*math.sin(angles) y = ((m*g)/(k*d))*math.tan(angles) plt.plot(x,y) plt.show()My question is how do i plot the two equations without knowing the value of theta?
Is there anything wrong with my code?