使用Vpython作图(helloworld)

 时间:2026-04-23 04:45:32

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')  

使用Vpython作图(helloworld)

4、可见下图

使用Vpython作图(helloworld)

5、回车;

可见下图

使用Vpython作图(helloworld)

6、初步完成Vpython demo

  • 光缆接头如何做?
  • 对不熟悉的应用系统首先如何入手
  • 如何让numpy使用gpu
  • 战旗直播怎么注销账号
  • LaTex排版技巧:[8]如何排版带上下括号的公式
  • 热门搜索
    微波炉怎么使用 呼吸不顺畅胸闷是怎么回事 商标怎么注册 前列腺增大怎么治疗 无线鼠标怎么连接 电脑太卡怎么办 孕妇身上痒是怎么回事 怎么格式化电脑 白带多是怎么回事 划船用英语怎么说