xxxxxxxxxx
def _(N=[1,2,3]):
def rho(phi):
if N==1:
return sqrt(2*cos(2*phi)) \
if 2*cos(2*phi)>=0 else 0
if N==2:
return 4*cos(2*phi-pi/4)^2
if N==3:
return 6*cos(2*phi) \
if 6*cos(2*phi)>=3 else 0
var('phi')
p=polar_plot(rho,(phi,0,2*pi),
fill=True,fillcolor='#3636ff')
p.show(figsize=(5,5),gridlines=True)
No comments:
Post a Comment