使用Vpython作图(helloworld)
1、先在ubuntu下安装vpython
sudo apt-get install Python-visual
2、进入python
导入模块 from visual.text import *
3、输入代码:scene.title = "Hello World"
text(pos=(0,3,0), string='HELLO WORLD', color=color.orange, depth=-1, justify='center')
text(pos=(0,0,0), string='HELLO WORLD', color=color.orange, depth=0, justify='center')
text(pos=(0,-3,0), string='HELLO WORLD', color=color.orange, depth=1, justify='center')

4、可见下图

5、回车;
可见下图

6、初步完成Vpython demo
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:57
阅读量:25
阅读量:93
阅读量:148
阅读量:50