From fe8320fd1a279434fb7028a884646b9b886d1dd4 Mon Sep 17 00:00:00 2001 From: march3 Date: Sun, 16 Apr 2023 16:33:30 +0800 Subject: [PATCH] =?UTF-8?q?Python=E8=B6=85=E4=BA=BA-=E5=AE=87=E5=AE=99?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sim_scenes/science/free_fall_of_ball.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sim_scenes/science/free_fall_of_ball.py b/sim_scenes/science/free_fall_of_ball.py index 000aa2d..c38b53a 100644 --- a/sim_scenes/science/free_fall_of_ball.py +++ b/sim_scenes/science/free_fall_of_ball.py @@ -7,6 +7,7 @@ # python_version :3.8 # ============================================================================== from bodies import Moon, Earth, Body +from objs import Football from common.consts import SECONDS_PER_HOUR, SECONDS_PER_MINUTE from sim_scenes.func import ursina_run @@ -18,9 +19,12 @@ if __name__ == '__main__': e = Earth(init_position=[0, 0, 0], size_scale=1, texture="earth_hd.jpg", init_velocity=[0, 0, 0]) bodies = [ e, - Moon(name='小月球', mass=4.4e18, - init_position=[0, e.raduis + 500, 0], # 球在地面上 500km - init_velocity=[0, 0, 0]), + Football(mass=500, size_scale=3e2, trail_color=[255, 0, 0], + init_position=[-500, e.raduis + 500, 0], # 球在地面上 500km + init_velocity=[0, 0, 0]), + Football(mass=5000, size_scale=3.8e2, + init_position=[500, e.raduis + 1000, 0], # 球在地面上 500km + init_velocity=[0, 0, 0]), ] # 使用 ursina 查看的运行效果 -- GitLab