diff --git a/sim_scenes/featured/tri_bodies_01.py b/sim_scenes/featured/tri_bodies_01.py index 3b30a912b751df0f7e4d3454ab1858f5bea86ced..9eae071c2a8cd61072d806585a8d99f1db2cf033 100644 --- a/sim_scenes/featured/tri_bodies_01.py +++ b/sim_scenes/featured/tri_bodies_01.py @@ -21,13 +21,13 @@ if __name__ == '__main__': 3、天体质量 mass """ bodies = [ - Sun(mass=1.5e30, init_position=[849597870.700, 0, 0], init_velocity=[0, 7.0, 0], - size_scale=5e1, texture="sun2.jpg"), # 太阳放大 50 倍 + Sun(mass=1.55e30, init_position=[8.5e8, 0, 1000000], init_velocity=[0.0, 7.1, 0], + size_scale=5e1, texture="sun21.jpg", color=(111, 140, 255)), # 蓝色太阳 Sun(mass=2.1e30, init_position=[0, 0, 0], init_velocity=[0, -8.0, 0], - size_scale=5e1, texture="sun2.jpg"), # 太阳放大 50 倍 - Sun(mass=2.5e30, init_position=[0, -849597870.700, 0], init_velocity=[18.0, 0, 0], - size_scale=5e1, texture="sun2.jpg"), # 太阳放大 50 倍 - Earth(init_position=[0, -349597870.700, 0], init_velocity=[15.50, 0, 0], + size_scale=5e1, texture="sun21.jpg", color=(250, 195, 47)), # 红色太阳 + Sun(mass=2.5e30, init_position=[0, -8.5e8, -2000000], init_velocity=[12.0, 0, 0], + size_scale=5e1, texture="sun21.jpg", color=(198, 29, 3)), # 黄色太阳 + Earth(init_position=[0, -3.5e8, 3000000], init_velocity=[13.360, 0, 0], size_scale=4e3, distance_scale=1), # 地球放大 4000 倍,距离保持不变 ] # 使用 mayavi 查看的运行效果 @@ -35,7 +35,7 @@ if __name__ == '__main__': def on_ready(): from ursina import application, window from ursina import camera - sky = create_sphere_sky(scale=80000, texture="bg_pan2.jpg") + sky = create_sphere_sky(scale=80000, texture="bg_pan_blue.jpg") camera.clip_plane_near = 1 camera.clip_plane_far = sky.scale_x*1.5 @@ -50,7 +50,7 @@ if __name__ == '__main__': # 使用 ursina 查看的运行效果 # 常用快捷键: P:运行和暂停 O:重新开始 I:显示天体轨迹 # position = 左-右+、上+下-、前+后- - ursina_run(bodies, SECONDS_PER_YEAR, + ursina_run(bodies, SECONDS_PER_YEAR / 3, cosmic_bg='', show_grid=False, position=(20 * AU, 0, -40 * AU),