当前位置: 首页 > news >正文

九度互联网站建设天台县网站建设哪家好

九度互联网站建设,天台县网站建设哪家好,dede网站404怎么做,设计网络平台的公司目录 一#xff1a;绘制一个正方体 二#xff1a;绘制一个3*3*3魔方 为了绘制立体#xff0c;主要用到Matplotlib中的一个函数voxels voxels([x, y, z, ], filled, facecolorsNone, edgecolorsNone, **kwargs) 绘制一组填充体素#xff0c;所有体素在坐标轴上绘制为1x1x…目录 一绘制一个正方体 二绘制一个3*3*3魔方 为了绘制立体主要用到Matplotlib中的一个函数voxels voxels([x, y, z, ], filled, facecolorsNone, edgecolorsNone, **kwargs) 绘制一组填充体素所有体素在坐标轴上绘制为1x1x1立方体filled[0, 0, 0]的lower corner位于原点。被遮挡的面不再绘制。 一绘制一个正方体 # 准备一组体素坐标     n_voxels np.ones((1,1,1), dtypebool) # 绘制     ax plt.figure().add_subplot(projection3d)     ax.voxels(n_voxels)     plt.show() 二绘制一个3*3*3魔方 (1) 填充体素,绘制 n_voxels np.ones((3,33), dtypebool) # 绘制     ax plt.figure().add_subplot(projection3d)     ax.voxels(n_voxels)     plt.show() 2增加间隙 可以对3x3x3的体素进行上采样即构建一个5x5x5的体素这样在每一个维度让处于两个体素中间的体素不显示即可产生间隙的效果。 # 准备一组体素坐标     n_voxels np.ones((3,3,3), dtypebool) size np.array(n_voxels.shape) * 2     filled np.zeros(size - 1, dtypen_voxels.dtype)     filled[::2, ::2, ::2] n_voxels # 绘制     ax plt.figure().add_subplot(projection3d)     ax.voxels(filled)     plt.show()   3缩小间隙保持美观 # 准备一组体素坐标     n_voxels np.ones((3,3,3), dtypebool) size np.array(n_voxels.shape) * 2     filled np.zeros(size - 1, dtypen_voxels.dtype)     filled[::2, ::2, ::2] n_voxels # 缩小间隙     # 构建voxels顶点控制网格     # x, y, z均为6x6x6的矩阵为voxels的网格     # //2是为了把索引范围从[0 1 2 3 4 5]转换为[0 0 1 1 2 2],这样x,y,z范围就回到了0~3     x, y, z np.indices(np.array(filled.shape) 1).astype(float) // 2     x[1::2, :, :] 0.95     y[:, 1::2, :] 0.95     z[:, :, 1::2] 0.95 # 绘制     ax plt.figure().add_subplot(projection3d)     ax.voxels(x, y, z,filled)     plt.show() 4绘制面颜色 由于只能给每个体素整体一个颜色不能对一个体素的不同面指定不同的颜色所以为了实现六个面不同颜色只能将3x3x3的矩阵改为5x5x5将最外边的那一层体素厚度设小一点近似于面然后赋颜色。 # 准备一组体素坐标     n_voxels np.ones((5,5,5), dtypebool) size np.array(n_voxels.shape) * 2     filled np.zeros(size - 1, dtypen_voxels.dtype)     filled[::2, ::2, ::2] n_voxels # 缩小间隙     # 构建voxels顶点控制网格     # x, y, z均为6x6x6的矩阵为voxels的网格     # //2是为了把索引范围从[0 1 2 3 4 5]转换为[0 0 1 1 2 2],这样x,y,z范围就回到了0~3     x, y, z np.indices(np.array(filled.shape) 1).astype(float) // 2     x[1::2, :, :] 0.95     y[:, 1::2, :] 0.95     z[:, :, 1::2] 0.95 x[0, :, :] 0.94     y[:, 0, :] 0.94     z[:, :, 0] 0.94     x[-1, :, :] - 0.94     y[:, -1, :] - 0.94     z[:, :, -1] - 0.94 # 给魔方六个面赋予不同的颜色     colors np.array([#ffd400, #fffffb, #f47920, #d71345, #145b7d, #45b97c])     facecolors np.full(filled.shape, #77787b)  # 设一个灰色的基调     facecolors[:, :, -1] colors[0]     facecolors[:, :, 0] colors[1]     facecolors[:, 0, :] colors[2]     facecolors[:, -1, :] colors[3]     facecolors[0, :, :] colors[4]     facecolors[-1, :, :] colors[5] filled[0, 0, :] 0     filled[0, -1, :] 0     filled[-1, 0, :] 0     filled[-1, -1, :] 0     filled[:, 0, 0] 0     filled[:, 0, -1] 0     filled[:, -1, 0] 0     filled[:, -1, -1] 0     filled[0, :, 0] 0     filled[0, :, -1] 0     filled[-1, :, 0] 0     filled[-1, :, -1] 0 # 绘制     ax plt.figure().add_subplot(projection3d)     ax.voxels(x, y, z,filled,facecolorsfacecolors)     plt.show()
http://www.pierceye.com/news/755752/

相关文章:

  • 提供服务的网站免费的进销存软件哪个简单好用
  • 长沙县政务网站网络公司名字大全寓意
  • 网站后台凡科建设有做网站维护的
  • 搭建网站需要什么软件上海在线
  • led灯外贸网站建设网站代码怎么优化
  • 网站建设维护什么意思江苏网络推广专员
  • 潍坊网站开发asp培训珠海市网站建设公司
  • 用什么做响应式网站建行个人余额查询网站
  • 做网站网站代理怎么找客源企业团建公司
  • 电子商务网站开发实战济南兼职做网站
  • 怎样创建网站视频学历提升的重要性
  • 百度搜索引擎录入网站1_ 掌握网站开发的基本流程 要求:熟悉网站开发与设计的基本流程.
  • 广州做网站建设如何在别人网站挂黑链
  • 宁德北京网站建设任丘建设银行网站
  • 积极加强网站建设连锁会员管理系统
  • 河南做外贸网站的公司简介wordpress做教育网站
  • 兴城做网站推广的企业网站后台管理软件
  • 自定义优定软件网站建设申请永久网站空间
  • 免费发布信息的网站平台怎么做网站统计
  • 制作网站的过程是对信息的龙海市住房和城乡建设局网站
  • 鱼台县建设局网站免费ppt模板制作软件
  • 质量好网站建设多少钱黄冈网站建设哪家快些
  • 使用阿里云部署wordpressseo搜索排名影响因素主要有
  • 大连制作网站建站教程图解
  • 百度的合作网站有哪些网站建设费用写创意
  • 建设个人网站ip护肤品网页设计图片
  • 德州网站建设优化金阳龙泉苑网站建设
  • 建站公司最新价格网站素材网
  • 高品质的网站开发公优酷网站谁做的
  • 广西兴业县建设局网站湖北天健建设集团有限公司网站