||
脚本:
n = 6 w = 0.85 u = array([[0,0], [0,0], [w,w], [w,w]]) v = array([[0,w], [0,w], [0,w], [0,w]]) z = array([[w,w], [0,0], [0,0], [w,w]]) s = array([nan, nan]) x = np.vstack([u, s, v]) y = np.vstack([v, s, u]) z = np.vstack([z, s, w-z]) m = n - 1 axes3d(axis=False, clip_plane=False, aspect='equal') for i in range(m, -1, -1): for j in range(m, -1, -1): for k in range(0, m+1): r = k / float(m) g = 1 - j / float(m) b = 1 - i / float(m) surf(i+x, j+y, k+z, facecolor=[r,g,b], edgecolor='k')
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-30 15:36
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社