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

太阳系三体模拟器

上级 6ad11108
......@@ -8,7 +8,7 @@
# ==============================================================================
from bodies import Sun, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, Moon
from common.consts import SECONDS_PER_WEEK, SECONDS_PER_DAY
from scenes.func import mayavi_run
from scenes.func import mayavi_run, ursina_run
if __name__ == '__main__':
# 八大行星:木星(♃)、土星(♄)、天王星(♅)、海王星(♆)、地球(⊕)、金星(♀)、火星(♂)、水星(☿)
......@@ -34,7 +34,4 @@ if __name__ == '__main__':
# mayavi_run(bodies, SECONDS_PER_WEEK, view_azimuth=-45)
from scenes.func import ursina_run
light = True
cosmic_bg = '../textures/cosmic1.png'
ursina_run(bodies, SECONDS_PER_DAY, position=(0, 0, 0), light=light, cosmic_bg=cosmic_bg)
\ No newline at end of file
ursina_run(bodies, SECONDS_PER_DAY, position=(0, 0, 0))
\ No newline at end of file
......@@ -7,8 +7,8 @@
# python_version :3.8
# ==============================================================================
from bodies import Sun, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto
from common.consts import SECONDS_PER_WEEK
from scenes.func import mayavi_run
from common.consts import SECONDS_PER_WEEK, SECONDS_PER_DAY
from scenes.func import mayavi_run, ursina_run
if __name__ == '__main__':
# 八大行星:木星(♃)、土星(♄)、天王星(♅)、海王星(♆)、地球(⊕)、金星(♀)、火星(♂)、水星(☿)
......@@ -36,4 +36,6 @@ if __name__ == '__main__':
]
# endregion
mayavi_run(bodies, SECONDS_PER_WEEK, view_azimuth=-45, view_distance=3e9, view_focalpoint=[5e2, 5e2, 5e2])
# mayavi_run(bodies, SECONDS_PER_WEEK, view_azimuth=-45, view_distance=3e9, view_focalpoint=[5e2, 5e2, 5e2])
ursina_run(bodies, SECONDS_PER_DAY, position=(0, 0, 0))
\ No newline at end of file
......@@ -8,7 +8,7 @@
# ==============================================================================
from bodies import Sun, Earth
from common.consts import SECONDS_PER_WEEK, SECONDS_PER_DAY
from scenes.func import mayavi_run
from scenes.func import mayavi_run, ursina_run
if __name__ == '__main__':
"""
......@@ -20,7 +20,4 @@ if __name__ == '__main__':
]
# mayavi_run(bodies, SECONDS_PER_WEEK, view_azimuth=-45)
from scenes.func import ursina_run
light = True
cosmic_bg = '../textures/cosmic1.png'
ursina_run(bodies, SECONDS_PER_DAY, position=(0, 0, 0), light=light, cosmic_bg=cosmic_bg)
ursina_run(bodies, SECONDS_PER_DAY, position=(0, 0, 0))
......@@ -28,10 +28,8 @@ if __name__ == '__main__':
Earth(init_position=[0, -349597870.700, 0], init_velocity=[15.50, 0, 0],
size_scale=4e3, distance_scale=1), # 地球放大 4000 倍,距离保持不变
]
# 使用 mayavi 查看的运行效果
# mayavi_run(bodies, SECONDS_PER_WEEK, view_azimuth=0)
# 使用 ursina 查看的运行效果
from scenes.func import ursina_run
light = True
cosmic_bg = '../textures/cosmic1.png'
ursina_run(bodies, SECONDS_PER_DAY, position=(0, 0, 0), light=light, cosmic_bg=cosmic_bg)
\ No newline at end of file
ursina_run(bodies, SECONDS_PER_DAY, position=(0, 0, 0))
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册