码迷,mamicode.com
首页 > 编程语言 > 详细

VPython 三维显示 —— hello word

时间:2016-10-09 23:04:44      阅读:325      评论:0      收藏:0      [点我收藏+]

标签:

使用VPython,python(x,y)中已安装VPython模块

  1. from visual import *
  2. cylinder(pos=(0,1,0), axis=(0,1,0), radius=0.1, color=(0,1,0))
  3. box = box(length=4, height=0.5, width=4, color=color.blue)
  4. ball = sphere(pos=(0,4,0), color=color.red)

窗口交互

  • 拖动右键切换角度(rotate)
  • 同时按住左键右键拖动缩放窗口 (和滚轮缩放不同……)

主要资料

官网doc

http://vpython.org/contents/docs/display.html

官网示例代码

安装目录下文件夹中





VPython 三维显示 —— hello word

标签:

原文地址:http://www.cnblogs.com/fly2wind/p/5943970.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!