diff --git a/sim_scenes/solar_system/hd_pluto_3d.py b/sim_scenes/solar_system/hd_pluto_3d.py new file mode 100644 index 0000000000000000000000000000000000000000..30915bd85393c4509b56853c038ac34ea626b0c4 --- /dev/null +++ b/sim_scenes/solar_system/hd_pluto_3d.py @@ -0,0 +1,39 @@ +# -*- coding:utf-8 -*- +# title :高清冥王星3D效果 +# description :高清冥王星3D效果 +# author :Python超人 +# date :2023-10-09 +# link :https://gitcode.net/pythoncr/ +# python_version :3.8 +# ============================================================================== +from bodies import Pluto +from common.consts import SECONDS_PER_WEEK, SECONDS_PER_DAY +from sim_scenes.func import ursina_run + +if __name__ == '__main__': + """ + 高清冥王星3D效果 + """ + bodies = [ + Pluto(texture="pluto.png", + init_position=[0, 0, 0], init_velocity=[0, 0, 0], + size_scale=2, show_name=False) + ] + pluto = bodies[0] + + # TODO: 开启3D摄像机 + from simulators.ursina.entities.camera3d import Camera3d + + # 3D摄像机初始化(两眼到鼻梁的距离为1000公里效果) + Camera3d.init(eye_distance=1000) + + # 使用 ursina 查看的运行效果 + # 常用快捷键: P:运行和暂停 O:重新开始 I:显示天体轨迹 + # position = 左-右+、上+下-、前+后- + ursina_run(bodies, SECONDS_PER_DAY, + position=(4 * pluto.radius, 0, -13500), + # cosmic_bg="", # 无背景(黑色) + show_grid=False, # 不显示网格 + show_camera_info=False, # 不显示摄像机信息 + show_control_info=False, # 不显示控制提示信息 + view_closely=0.001) diff --git a/sim_scenes/solar_system/hd_venus_3d.py b/sim_scenes/solar_system/hd_venus_3d.py new file mode 100644 index 0000000000000000000000000000000000000000..359cf58cf48a9031980eb8b8053650c832011738 --- /dev/null +++ b/sim_scenes/solar_system/hd_venus_3d.py @@ -0,0 +1,39 @@ +# -*- coding:utf-8 -*- +# title :高清金星3D效果 +# description :高清金星3D效果 +# author :Python超人 +# date :2023-10-09 +# link :https://gitcode.net/pythoncr/ +# python_version :3.8 +# ============================================================================== +from bodies import Venus +from common.consts import SECONDS_PER_WEEK, SECONDS_PER_DAY +from sim_scenes.func import ursina_run + +if __name__ == '__main__': + """ + 高清金星3D效果 + """ + bodies = [ + Venus(texture="venus_hd.jpg", + init_position=[0, 0, 0], init_velocity=[0, 0, 0], + size_scale=1, show_name=False) + ] + venus = bodies[0] + + # TODO: 开启3D摄像机 + from simulators.ursina.entities.camera3d import Camera3d + + # 3D摄像机初始化(两眼到鼻梁的距离为1000公里效果) + Camera3d.init(eye_distance=1000) + + # 使用 ursina 查看的运行效果 + # 常用快捷键: P:运行和暂停 O:重新开始 I:显示天体轨迹 + # position = 左-右+、上+下-、前+后- + ursina_run(bodies, SECONDS_PER_DAY, + position=(1.4 * venus.radius, 0, -28000), + # cosmic_bg="", # 无背景(黑色) + show_grid=False, # 不显示网格 + show_camera_info=False, # 不显示摄像机信息 + show_control_info=False, # 不显示控制提示信息 + view_closely=0.001) diff --git a/sim_scenes/tri_bodies/tri_bodies_perfect.py b/sim_scenes/tri_bodies/tri_bodies_perfect.py index a736b63198720f5c85e0874bf4a3ac873f15d405..fce5c8df878a287a36719f57ee43dff26231b040 100644 --- a/sim_scenes/tri_bodies/tri_bodies_perfect.py +++ b/sim_scenes/tri_bodies/tri_bodies_perfect.py @@ -1,5 +1,5 @@ # -*- coding:utf-8 -*- -# title :三体场景模拟01 +# title :三体场景模拟 # description :三体场景模拟(3个太阳、1个地球) # author :Python超人 # date :2023-02-11 diff --git a/sim_scenes/tri_bodies/two_bodies_01.py b/sim_scenes/tri_bodies/two_bodies_01.py index 3b075b8abd9cc07fab0878eae3d157fa69de244e..f2c61daa8923cd44645e06c16c05be197229a9e1 100644 --- a/sim_scenes/tri_bodies/two_bodies_01.py +++ b/sim_scenes/tri_bodies/two_bodies_01.py @@ -1,6 +1,6 @@ # -*- coding:utf-8 -*- -# title :三体场景模拟01 -# description :三体场景模拟(2个太阳、1个地球) +# title :两体场景模拟01 +# description :两体场景模拟01(2个太阳、1个地球) # author :Python超人 # date :2023-02-11 # link :https://gitcode.net/pythoncr/ diff --git a/sim_scenes/tri_bodies/water_drop_01.py b/sim_scenes/tri_bodies/water_drop_01.py index 746de41f72e83921560f1fb54298ce6907bad6c3..6ef1426d6f520e0d2544910477fa4075359635eb 100644 --- a/sim_scenes/tri_bodies/water_drop_01.py +++ b/sim_scenes/tri_bodies/water_drop_01.py @@ -1,6 +1,6 @@ # -*- coding:utf-8 -*- -# title :地月场景模拟 -# description :地月场景模拟(月球始终一面朝向地球、月球对地球的扰动) +# title :三体水滴场景模拟 +# description :三体水滴场景模拟 # author :Python超人 # date :2023-05-01 # link :https://gitcode.net/pythoncr/ @@ -20,8 +20,7 @@ from ursina import camera if __name__ == '__main__': """ - 月球始终一面朝向地球 - 月球对地球的扰动 + 三体水滴场景模拟 """ OFFSETTING = 0 WATER_SPEED = 400 diff --git a/sim_scenes/tri_bodies/water_drop_02.py b/sim_scenes/tri_bodies/water_drop_02.py index 44dcea6cdc9466ad879826b736ba372774f186be..8d73ac1339b313f951803916458e890943dc864b 100644 --- a/sim_scenes/tri_bodies/water_drop_02.py +++ b/sim_scenes/tri_bodies/water_drop_02.py @@ -1,6 +1,6 @@ # -*- coding:utf-8 -*- -# title :地月场景模拟 -# description :地月场景模拟(月球始终一面朝向地球、月球对地球的扰动) +# title :三体水滴场景模拟 +# description :三体水滴场景模拟 # author :Python超人 # date :2023-05-01 # link :https://gitcode.net/pythoncr/ @@ -20,8 +20,7 @@ from ursina import camera if __name__ == '__main__': """ - 月球始终一面朝向地球 - 月球对地球的扰动 + 三体水滴场景模拟 """ OFFSETTING = 0 WATER_SPEED = 400 @@ -46,12 +45,12 @@ if __name__ == '__main__': water_drop = WaterDrop( init_position=[0, 0, 0], - # texture="drops_bright.png", - # trail_color=[200, 200, 255], - init_velocity=[0, 0, 0], - # size_scale=4e4, - size_scale=3e3 - ).set_ignore_gravity(True).set_light_disable(True) + # texture="drops_bright.png", + # trail_color=[200, 200, 255], + init_velocity=[0, 0, 0], + # size_scale=4e4, + size_scale=3e3 + ).set_ignore_gravity(True).set_light_disable(True) # moon = Moon(init_position=[0, 0, 363104], # 距地距离约: 363104 至 405696 km # init_velocity=[-1.03, 0, 0], size_scale=2e1) # 月球放大 10 倍,距离保持不变 # moon.set_light_disable(True) @@ -114,12 +113,10 @@ if __name__ == '__main__': application.time_scale = 1 - # # 订阅事件后,上面2个函数功能才会起作用 # # 运行前会触发 on_ready UrsinaEvent.on_ready_subscription(on_ready) - # 使用 ursina 查看的运行效果 # 常用快捷键: P:运行和暂停 O:重新开始 I:显示天体轨迹 # position = 左-右+、上+下-、前+后-