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

Python超人-宇宙模拟器

上级 11ec7b03
......@@ -173,9 +173,9 @@ def create_solar_system_bodies(ignore_mass=False, init_velocity=None):
Mars(name="火星", size_scale=2e3), # 火星放大 2000 倍,距离保持不变
# Asteroids(name="小行星群", size_scale=3.2e2,
# parent=sun), # 小行星群模拟(仅 ursina 模拟器支持)
Jupiter(name="木星", size_scale=0.6e3), # 木星放大 600 倍,距离保持不变
Saturn(name="土星", size_scale=0.6e3), # 土星放大 600 倍,距离保持不变
Uranus(name="天王星", size_scale=0.7e3), # 天王星放大 700 倍,距离保持不变
Jupiter(name="木星", size_scale=0.5e3), # 木星放大 500 倍,距离保持不变
Saturn(name="土星", size_scale=0.5e3), # 土星放大 500 倍,距离保持不变
Uranus(name="天王星", size_scale=0.6e3), # 天王星放大 600 倍,距离保持不变
Neptune(name="海王星", size_scale=1e3), # 海王星放大 1000 倍,距离保持不变
Pluto(name="冥王星", size_scale=10e3), # 冥王星放大 10000 倍,距离保持不变(从太阳系的行星中排除)
]
......
# -*- coding:utf-8 -*-
# title :太阳系场景模拟1
# description :太阳系场景模拟(展示的效果为太阳系真实的距离)
# title :在太阳系中以光速运行
# description :在太阳系中以光速运行
# author :Python超人
# date :2023-02-11
# date :2023-04-05
# link :https://gitcode.net/pythoncr/
# python_version :3.8
# ==============================================================================
from bodies import Sun, Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, Moon, Asteroids, Body
from bodies import Sun, Asteroids, Body
from common.consts import SECONDS_PER_WEEK, SECONDS_PER_DAY, SECONDS_PER_YEAR, AU
from sim_scenes.func import mayavi_run, ursina_run, create_solar_system_bodies, create_text_panel, create_light
from simulators.ursina.ursina_config import UrsinaConfig
from sim_scenes.func import ursina_run, create_solar_system_bodies, create_text_panel, create_light
from simulators.ursina.ursina_event import UrsinaEvent
from ursina import Text, Panel, color, camera, Vec3
from ursina import camera
# 已到达天体列表
arrived_bodies = []
......@@ -19,6 +18,8 @@ text_panel = None
arrived_info = ""
CAMERA_FOLLOW_LIGHT = None # 不跟随光
# CAMERA_FOLLOW_LIGHT = 'ForwardView' # 向前看
# CAMERA_FOLLOW_LIGHT = 'SideView' # 侧面看
......@@ -31,8 +32,6 @@ def on_reset():
text_panel.text = arrived_info
on_reset()
# 订阅重新开始事件
UrsinaEvent.on_reset_subscription(on_reset)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册