I am really new to programming...
But here is my question :
I cannot post images but the plot I wish to have is a "crown" (two concentric circle with radius a I mean, mathematically speaking is really easy to define but how can I do it with a python program ?
I thought of something like this :
def Fm1(X, Y):
r =r = sqrt(1.*X**2+1.*Y**2)
cos = 1.*X/r
sin = 1.*Y/r
teta = where( sin >= 0. , arccos(cos) , -arccos(cos) )
teta = where(r == 0. , 0., teta)
return r, teta
def F(r,teta):
X = r*cos(teta)
Y = r*sin(teta)
return X,Y
Those are simply the function that let you pass from the cartesian to the polar coordinates, and then :
r=sy.linspace(a,b,N+1) # radius division
t=sy.linspace(0,2.*pi,2**NN) #angle (theta) division
R,T=meshgrid(r,t) #creating a mesh
X,Y = F(R,T)#transform from polar to cartesian
#Plotting :
fig=plt.figure()
ax=fig.add_subplot(111)
ax.plot(X, Y)
plt.show()
But the result is : concentric polygons. I wish I had N+1 circles at equidistance from radius a to radius b and 2**NN lines (origin center and a given angle).
Sorry I know it's really a trivial question,
Thanks


where,ones,Fcm1,meshgrid, andFc?ato define a crown?matplotliband its subset functionspylab