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

Python超人-宇宙模拟器

上级 7c90a7bb
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
# python_version :3.8 # python_version :3.8
# ============================================================================== # ==============================================================================
from bodies import Moon, Earth, Body from bodies import Moon, Earth, Body
from objs import Football
from common.consts import SECONDS_PER_HOUR, SECONDS_PER_MINUTE from common.consts import SECONDS_PER_HOUR, SECONDS_PER_MINUTE
from sim_scenes.func import ursina_run from sim_scenes.func import ursina_run
...@@ -18,8 +19,11 @@ if __name__ == '__main__': ...@@ -18,8 +19,11 @@ if __name__ == '__main__':
e = Earth(init_position=[0, 0, 0], size_scale=1, texture="earth_hd.jpg", init_velocity=[0, 0, 0]) e = Earth(init_position=[0, 0, 0], size_scale=1, texture="earth_hd.jpg", init_velocity=[0, 0, 0])
bodies = [ bodies = [
e, e,
Moon(name='小月球', mass=4.4e18, Football(mass=500, size_scale=3e2, trail_color=[255, 0, 0],
init_position=[0, e.raduis + 500, 0], # 球在地面上 500km init_position=[-500, e.raduis + 500, 0], # 球在地面上 500km
init_velocity=[0, 0, 0]),
Football(mass=5000, size_scale=3.8e2,
init_position=[500, e.raduis + 1000, 0], # 球在地面上 500km
init_velocity=[0, 0, 0]), init_velocity=[0, 0, 0]),
] ]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册