提交 4a0e6ea2 编写于 作者: 三月三net's avatar 三月三net

Python超人-宇宙模拟器

上级 544ca4d7
......@@ -93,12 +93,12 @@ class 星球:
def 场景1():
global 星球列表, 时间步长
时间步长 = 0.01
时间步长 = 0.03
# 创建星球列表
星球列表 = [
星球(质量=5e12, 位置=[0, 0], 速度=[0, 0.2], 颜色='red', 名称偏移=[1, 0]),
星球(质量=5e11, 位置=[25, 0], 速度=[0, 2], 颜色='blue'),
星球(质量=5e11, 位置=[-25, 0], 速度=[0, -2], 颜色='green')
星球(质量=5e12, 位置=[0, 0], 速度=[0, 0.15], 颜色='red', 名称偏移=[1, 0]),
星球(质量=2e11, 位置=[25, 0], 速度=[0, 2.1], 颜色='blue'),
星球(质量=2e11, 位置=[-25, 0], 速度=[0, -1.8], 颜色='green')
]
坐标轴.set_xlim(-50, 50)
坐标轴.set_ylim(-20, 80)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册