I want to make an animation of the curve (where you incrementally draw it) with parametrization: x(t) = sin(3t) and y(y) = sin(4t) where t[0, 2pi].
Attempt:
%matplotlib notebook
import matplotlib.pyplot as plt
import math
import numpy as np
# set the minimum potential
rm = math.pow(2, 1 / 6)
t = np.linspace(-10, 10, 1000, endpoint = False)
x = []
y = []
for i in len(t): #TypeError 'int' object is not iterable
x_i = np.sin( 3 * t[i] )
y_i = np.sin( 4 * t[i] )
x.append(x_i)
y.append(y_i)
# plot the graph
plt.plot(x,y)
# set the title
plt.title('Plot sin(4t) Vs sin(3t)')
# set the labels of the graph
plt.xlabel('sin(3t)')
plt.ylabel('sin(4t)')
# display the graph
plt.show()
But TypeError 'int' object is not iterable springs up... How can I fix it?
Thanks