||
MeteoInfoLab脚本程序绘制三维水母的例子,用到了airy函数。
from mipylib.numeric.special import airy
[x,y,z] = sphere(80)
c = lambda x : cos(x * pi)
r = c(arange(-4, 4.1, .1))
d = lambda x, y, z : surf(x, y, z, alpha=.5, facecolor='interp',
edgecolor=None, cmap='MPL_spring_r')
figure(facecolor='k', newfig=False)
axes3d(aspect='equal', axis=False, clip_plane=False)
lighting(position=[1,1,1,0], ambient=1, mat_specular=1)
d(x, y, z*cos(z)*r)
d(x*2, y*2, 2*abs(z+.4)-.5)
r = arange(1, 3.1, .1)
for o in r[:]:
for n in r:
d(x/4/n+n*c(o), c(o)*y/4/n+n*c(o+.5), z/9/n+airy(4*n-9)[0]/4-.7)
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-30 13:32
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社