Feb-11-2019, 12:44 PM
(Feb-10-2019, 04:32 AM)scidam Wrote:I sincerely thank you for your help.(Feb-09-2019, 06:32 PM)mudezda1 Wrote: My question is how do i plot the two equations without knowing the value of theta?I didn't see the value of theta...(Feb-09-2019, 06:32 PM)mudezda1 Wrote: Is there anything wrong with my code?You don't needmath
at all, since you are importing numpy. Also, you don't need to use loops. You need to create arrays of x- and y-values and plot the parametric graph.import numpy as np import matplotlib.pyplot as plt # define your constants here... angles = np.arange(360) / 180 * np.pi # step is one degree x = 1 - ((2 * l) / d) * np.sin(angles) y = ((m * g) / (k * d)) * np.tan(angles) plt.plot(x, y) plt.show()