From 549ac3c538fd875e77256a643ef7ab8be6977760 Mon Sep 17 00:00:00 2001 From: march3 Date: Thu, 20 Apr 2023 19:59:12 +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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sim_scenes/science/free_fall_of_ball.py b/sim_scenes/science/free_fall_of_ball.py index 7681188..015ba3b 100644 --- a/sim_scenes/science/free_fall_of_ball.py +++ b/sim_scenes/science/free_fall_of_ball.py @@ -16,15 +16,16 @@ if __name__ == '__main__': 自由落地模拟 """ # 地球在中心位置 - earth = Earth(init_position=[0, 0, 0], size_scale=1, texture="earth_hd.jpg", init_velocity=[0, 0, 0]) + earth = Earth(init_position=[0, 0, 0], init_velocity=[0, 0, 0], + size_scale=1, texture="earth_hd.jpg") # earth.raduis = 6373.22 # 创建的3个不同质量,不同高度的球,观察这3个球打到地球表面上的加速度 - ball_1 = Football(mass=500, size_scale=3e2, trail_color=[255, 0, 0], + ball_1 = Football(mass=500, size_scale=2.65e2, trail_color=[255, 0, 0], # 球在地面上 518 多公里处 # 518 = sqrt[(earth.raduis + 500)² + (-500)²] - earth.raduis init_position=[-500, earth.raduis + 500, 0], init_velocity=[0, 0, 0], gravity_only_for=[earth]) - ball_2 = Football(mass=1000, size_scale=3e2, trail_color=[0, 255, 0], + ball_2 = Football(mass=1000, size_scale=3.3e2, trail_color=[0, 255, 0], # 球在地面上 800 多公里处 init_position=[0, earth.raduis + 800, 0], init_velocity=[0, 0, 0], gravity_only_for=[earth]) -- GitLab