diff --git a/sim_scenes/science/earth_seasons_2.py b/sim_scenes/science/earth_seasons_2.py index 8779b755074afaa8786b6b69e044542fe697a497..f055fff72912147522f6b6c2b2b337a53fad6f60 100644 --- a/sim_scenes/science/earth_seasons_2.py +++ b/sim_scenes/science/earth_seasons_2.py @@ -25,7 +25,7 @@ if __name__ == '__main__': earth_1, earth_2, earth_3, earth_4 = create_important_pos_earths() # 创建运动的地球和云层 - earth, earth_clouds = create_earth(with_clouds=True, earth_rotation_speed=1.0, clouds_rotation_speed=1.2) + earth, earth_clouds = create_earth(with_clouds=True, earth_rotation_speed=0.5, clouds_rotation_speed=0.8) pos_vel = get_earth_pos_vel_by_term_name("寒露") diff --git a/sim_scenes/solar_system/solar_system_reality.py b/sim_scenes/solar_system/solar_system_reality.py index 40acf8e777a3571912b2488f19082a86c2a15e71..b10bae0e43614bc9ff965147e27352ac88b34e08 100644 --- a/sim_scenes/solar_system/solar_system_reality.py +++ b/sim_scenes/solar_system/solar_system_reality.py @@ -165,6 +165,7 @@ class SolarSystemRealitySim: def run(self, debug_mode=False, start_time=None, + dt=None, show_asteroids=False, show_earth_clouds=False, recalc_moon_pos=True, @@ -173,6 +174,7 @@ class SolarSystemRealitySim: 模拟运行 @param debug_mode: 是否调试模式 @param start_time: 运行的开始时间 + @param dt: 运行速度(dt的值为秒数,表示1秒相当于dt的秒数) @param show_asteroids: 是否显示小行星带 @param show_earth_clouds: 地球是否显示云层(图片效果,不是真实的云层) @param recalc_moon_pos: 为了更好的展示效果,需要对月球的位置重新计算(使得地月距离放大,月球相对地球方向不变) @@ -186,6 +188,9 @@ class SolarSystemRealitySim: self.show_earth_clouds = show_earth_clouds # 创建太阳系天体 self.create_bodies() + # glows = (glow_num:10, glow_scale:1.03 glow_alpha:0.1~1) + self.sun.glows = (80, 1.005, 0.01) + # 对地球进行初始化 self.init_earth() # 绑定事件 @@ -206,9 +211,8 @@ class SolarSystemRealitySim: cosmic_bg = None else: cosmic_bg = '' - - dt = SECONDS_PER_DAY # 1秒=1天 - dt = 1 # 1秒=1秒 + if dt is None: + dt = 1 # 1秒=1秒 # 使用 ursina 查看的运行效果 # 常用快捷键: P:运行和暂停 O:重新开始 I:显示天体轨迹 # position = 左-右+、上+下-、前+后- @@ -226,13 +230,15 @@ if __name__ == '__main__': sim = SolarSystemRealitySim() sim.run( # debug_mode=True, # 是否调试模式 + dt=SECONDS_PER_DAY / 12, # 1秒=1天 + start_time='2023-10-24 00:00:00', # start_time='2050-01-01 12:00:00', # 指定运行的开始时间,不指定为当前时间 # 网上没有找到精确的日期,宇宙模拟器展示大概2040年8、9月份 # start_time='2040-08-15 12:00:00', # 金木水火土五星连珠的时间 # https://baijiahao.baidu.com/s?id=1776120995339598449 # start_time='2049-01-01 12:00:00', # 九星连珠的时间 # https://988892.com/qiwenyishi/2023061960711.html # start_time='2149-12-10 12:00:00', # 九星连珠的时间 # https://baijiahao.baidu.com/s?id=1654160345900112362 # show_asteroids=True, # 是否显示小行星带(图片模拟) - # show_earth_clouds=True, # 地球是否显示云层(图片效果,不是真实的云层) + show_earth_clouds=True, # 地球是否显示云层(图片效果,不是真实的云层) # recalc_moon_pos=False, # 为了更好的展示效果,需要对月球的位置重新计算(使得地月距离放大,月球相对地球方向不变) - # clock_position_center=True # 时钟是否显示在中间 + clock_position_center=True # 时钟是否显示在中间 )