I am trying to define the archimedean spiral: when im trying to define the inclination angle (incl) of the tangent vector to the orbit ( i.e: tan(incl)) im getting an error :"'numpy.ufunc' object does not support item assignment".
the same error when I want to calculate cos(incl), and sin(incl).
Any suggestion and help.
My code is:
a= 2. # will turn the spiral
v= 0.23
omega = 0.2
r0 = v/omega
t=np.linspace(0,T,N+1)
r= v*t
#theta = a + r/r0
theta = omega*t
x=r* np.cos( omega*t)
y=r* np.sin( omega*t)
dxdr = np.cos(theta) - (r/r0)*np.sin(theta)
dydr = np.sin(theta) + (r/r0)*np.cos(theta)
dydx = (r0*np.sin(theta) + r*np.cos(theta))/r0*np.cos(theta) - r*np.sin(theta)
np.tan[incl]= dydx
incl = np.arctan((dydx))
### Calculate cos(incl) ,sin(incl) :
np.sin[np.incl] = np.tan(np.incl)/np.sqrt(1+ np.tan(np.incl)*2)
np.cos[incl] = 1/np.sqrt(1+ np.tan(incl)*2)