3D Basketball Shot and Rebound Trajectory Simulation

3D Basketball Shot and Rebound Trajectory Simulation
Loading the math board and drawing, please wait…
2017-06-09 18:23
This GeoGebra example models a basketball shot in 3D, showing the ball’s projectile path, rebound behavior, and spatial relationships among the ball, hand, floor, and target. It uses vectors, initial velocity components v0_x, v0_y, v0_z, gravity g, ball radius rball, planes, spheres, circles, distances, intersections, closest points, rotations, translations, and locus/parametric ideas. The construction combines Point, Vector, Sphere, Plane, Circle, Segment, Distance, Intersect, ClosestPoint, Rotate, Translate, Locus, Surface, Prism, If, Min, Textfield, and TableText to define geometry, test rebound conditions, and display parameters. It is suitable for high school or introductory college courses in physics, vector geometry, coordinate geometry, and dynamic modeling.

GeoGebra Commands & Parameters

  1. Min(sqrt(x(G12toeR)^(2) + y(G12toeR)^(2)), sqrt(x(G12toeL)^(2) + y(G12toeL)^(2))) → Gtoedist
  2. Segment(Ghand_L0, G4_L) → gghandsho_L0
  3. Distance(GHLdet, G4_L) → GHLrad
  4. Intersect(yAxis, xAxis) → O
  5. Mirror(E_1, O) → E_2
  6. Semicircle(E_1, E_2) → c
  7. Distance(A_{xy}, O) → distA
  8. If(t < t_c, ωk, (ℯ^((-(t - t_c))) * ωk)) → ω
  9. Distance(Hxy2, C_c) → dist2_{ring}
  10. Distance(Hxy1, C_c) → dist1_{ring}
  11. Distance(A_{xy}, (x(Vpar), y(Vpar))) → VAxy
  12. Distance(GHRdet, G4_R) → GHRrad
  13. If(t < td, Point[{GHLx(t), GHLy(t), GHLz(t)}], Point[{GHLx2(t), GHLy2(t), GHLz2(t)}]) → Ghand_L
  14. If(sqrt((x(G4_L) - x(O'))^(2) + (y(G4_L) - y(O'))^(2)) - sqrt((x(Ghand_L) - x(O'))^(2) + (y(Ghand_L) - y(O'))^(2)) > 0, 1, -1) → fwd_L
  15. Vector(((((-fwd_L) * cos(α)) * cos(π / 2 - ϕhs_{LR})), (((-fwd_L) * sin(α)) * cos(π / 2 - ϕhs_{LR})), ((-fwd_L) * cos(ϕhs_{LR})))) → elbdisp_{unitLR}
  16. Distance(Ghand_L, G4_L) → gghandsho_L
  17. If(gghandsho_L^(2) > armlen^(2), 0, (1 / 2 * sqrt(armlen^(2) - gghandsho_L^(2)))) → elbdisp_L
  18. Midpoint(Ghand_L, G4_L) → elbL_0
  19. If(t < td, Point[{GHRx(t), GHRy(t), GHRz(t)}], Point[{GHRx2(t), GHRy2(t), GHRz2(t)}]) → Ghand_R
  20. Distance(Ghand_R, G4_R) → gghandsho_R
  21. Mirror(U_1, Xf) → U_2
  22. Mirror(U_3, Xc) → U_4
  23. Segment(E_1, U_1) → u_1
  24. Segment(E_2, U_2) → u_2
  25. Mirror(U_5, Xf) → U_6
  26. Mirror(U_7, Xc) → U_8
  27. Polygon(U_5, U_3, U_4, U_6) → poly1, u_5, u_3, u_4, u_6
  28. Semicircle(U_8, U_7) → d
  29. Surface(((R_{ring} + (r_{ring} * cos(u))) * cos(v)), ((R_{ring} + (r_{ring} * cos(u))) * sin(v)), (r_{ring} * sin(u)) + h, u, 0, (2 * π), v, 0, (2 * π)) → ring
  30. Polygon(T_1, T_2, T_4, T_3) → poly_{bckb}, t_1, t_2, t_4, t_3
  31. Segment(C_b, C_t) → csost
  32. Dilate(poly_{bckb}, 0.5, C_t) → poly2_{tabint}
  33. Dilate(poly_{bckb}, 0.25, C_t) → poly2_{sost}
  34. Prism(poly2_{sost}, -3.1998318771914116) → a, B, edge1, edge2, edge3, edge4, edge5, edge6, edge7, edge8, C, D, E, face1, face2, face3, face4, face5
  35. Mirror(U_9, Xff) → U_{10}
  36. Polygon(U_5, U_9, U_{10}, U_6) → poly2, u_7, u_9, u_{10}, u_8
  37. Polygon(C, C', C_{xyr}, C_{xy}) → poly3, c_1, c', c_{xyr}, c_{xy}
  38. Polygon(B, B', B_{xyr}, B_{xy}) → poly4, b, b', b_{xyr}, b_{xy}
  39. Polygon(B', C', C, B) → poly5, b'_1, c'_1, c_2, b_1
  40. Polygon(B_{xyr}, C_{xyr}, C', B') → poly6, b_2, c_3, c'_2, b'_2
  41. Polygon(C_{xy}, B_{xy}, B, C) → poly7, c_4, b_3, b_4, c_5
  42. Point(face2) → G
  43. Segment(F, G) → f
  44. Mirror(F, planexz) → F'
  45. Mirror(G, planexz) → G'
  46. Segment(F', G') → f'
  47. CurveCartesian(((-u)) / 5 + R_{ring}, 0, h - u, u, 0, 0.4) → fnet
  48. Surface(fnet, 360°, zAxis) → net
  49. Vector(A, A') → u
  50. Segment(A, A_{xy}) → i
  51. Mirror(TL1, Xf) → TL1'
  52. Mirror(TL2, xAxis) → TL2'
  53. Semicircle(TL2, TL2') → k
  54. Segment(TL1, TL2) → j
  55. Segment(TL1', TL2') → l
  56. Segment(TL2', TL2) → m
  57. CurveCartesian((x(P) - (w * cos(α)), y(P) - (w * sin(α)), z(P) + (w * (((-g) * t) + v0_z) / v0_s)), w, -2 / v_0, 4 / v_0) → tgtra
  58. If(resultptsnew ≟ 3, "OK - 3pts", resultptsnew ≟ 2, "OK - 2pts", "Fail") → result
  59. CurveCartesian(((v0_x * t) + x(A), (v0_y * t) + y(A), ((-1 / 2 * g) * t^(2)) + (v0_z * t) + z(A)), t, 0, tz_0) → tra
  60. If((checkv0 < 0) ∧ (checkv0_m > 0), (v_0 / g * sqrt(v_0^(2) - ((2 * g) * (h - z(A))))), distA) → s0_{cond}
  61. Segment(G4, G0) → trunk
  62. Segment(G6, G8) → legl_2
  63. Segment(G0, G6) → legl_1
  64. Segment(G0, G7) → legr_1
  65. Segment(G7, G9) → legr_2
  66. Line(A_{xy}, O) → n
  67. OrthogonalLine(A_{xy}, n, xOyPlane) → p
  68. Line(G1, p) → q
  69. Rotate(Head, headangle, q) → Head'
  70. Segment(G9, G12toeL) → footL
  71. Segment(G8, G12toeR) → footR
  72. Midpoint(Ghand_R, G4_R) → elbR_0
  73. Translate(elbL_0, Vector[(elbdisp_L * elbdisp_{unitLR})]) → Gelb_L
  74. Segment(Gelb_L, Ghand_L) → arml_2
  75. Segment(G4_L, Gelb_L) → arml_1
  76. If(gghandsho_R^(2) > armlen^(2), 0, (1 / 2 * sqrt(armlen^(2) - gghandsho_R^(2)))) → elbdisp_R
  77. Translate(elbR_0, Vector[(elbdisp_R * elbdisp_{unitLR})]) → Gelb_R
  78. Segment(Gelb_R, Ghand_R) → armr_2
  79. Segment(G4_R, Gelb_R) → armr_1
  80. If(gghandsho_R > armlen, false, t) → o
  81. Distance(Ghand_L0, (x(A) + (rball * cos(α - π / 4)) + (v0_x * t), y(A) + (rball * sin(α - π / 4)) + (v0_y * t), z(A) - (rball * sin(ϕ)) - ((1 / 2 * g) * t^(2)) + (v0_z * t))) → distx
  82. Line(elbL_0, elbdisp_{unitLR}) → elbline_L
  83. Line(elbR_0, elbdisp_{unitLR}) → elbline_R
  84. Locus(Ghand_L, t) → loc1
  85. Textfield(timelimit) → SetGameTime
  86. If(condtot, If[Gtoedist > 6.25, 3, 2], 0) → e
  87. If(0 < t < t_c, true, false) → flyingball
  88. If(time - floor(time) ≥ 0.95, LaTeX[floor(time + 1) + ".0"], If[time - floor(time) < 0.05, LaTeX[floor(time) + ".0"], LaTeX[round(time, 1)]]) → timeroundfix1
  89. TableText({{"", "shots", "ok/shots", "ok%"}, {"total shots", 2, 3, 4}, {"2pts shots", 2, 3, 4}, {"3pts shots", 2, 3, 4}, {1, 2, 3, 4}}, "c_|||h") → ttxtest
  90. Polygon(U_3, U_4, U_{10}, U_9) → polyfloor, r, s, f_1, g_1
  91. Circle(O_{ring}, R_{ring}, zAxis) → liring
  92. Vector(A, A + Dilate[ic00(2), vsca]) → uv
  93. Sphere(Prun, rball) → ball_1
  94. If(Distance[Prun, liring] < r_{ring} + rball, true, false) → impring
  95. ClosestPoint(liring, Prun) → Q
  96. Line(Prun, Q) → pq
  97. If(Distance[Prun, plaz] < rball + 0.02, true, false) → impfloor
  98. If(Distance[Prun, ClosestPointRegion[poly_{bckb}, Prun]] < rball, true, false) → impbackboard
  99. Plane(A, AV, Vpar) → αpla
  100. Circle((x(Prun), y(Prun), 0), rball, xOyPlane) → ballshdw
  101. Segment((x(T_3), y(T_3), 0), (x(T_4), y(T_4), 0)) → shdwbb
  102. Circle((x(O_{ring}), y(O_{ring}), 0), R_{ring}, zAxis) → ringshdw
  103. Element(listvectordirection, If[faces > 0, faces, 5]) → Selectedvector
  104. Segment((x(C_t), y(C_t), 0), (x(C_b), y(C_b), 0)) → shdwringsup
  105. Segment((x(G), y(G), 0), (x(D) + 0.37, y(D), 0)) → shdwGD
  106. Segment((x(G'), y(G'), 0), (x(E) + 0.37, y(E), 0)) → shdwG'E
  107. Polygon((x(G), y(G), 0.02), (x(G'), y(G'), 0.02), (x(E) + 0.42, y(E), 0.02), (x(D) + 0.42, y(D), 0.02)) → shdwsup, h_1, i_1, j_1, k_1
  108. Dilate(d, 0.1, Xc) → d_c
  109. CurveCartesian(((x(ic(2)) * τ) + x(ic(1)), (y(ic(2)) * τ) + y(ic(1)), ((-1 / 2 * g) * τ^(2)) + (z(ic(2)) * τ) + z(ic(1))), τ, 0, tzrun_0) → trarun
  110. Dilate(vvar, vsca) → vvar'
  111. Translate(Prun, Vector[Dilate[vvar', 0.95]]) → vtpoint
  112. If(tresultpts, If[Gtoedist ≥ 6.25, 3, 2], 0) → resultpts
  113. If((z(Prun) > h - rball) ∧ (z(Prun) < h) ∧ (z(vvar) < 0), true, false) → tresult
  114. If(tresult_t > 0, 0, 0) → tscore
  115. If(x(A) ≥ 0, ((atan(y(A) / x(A)) * 180 / π))°, If[y(A) > 0, ((atan(y(A) / x(A)) * 180 / π) + 180)°, ((atan(y(A) / x(A)) * 180 / π) - 180)°]) → αtgt
  116. Segment(P, Q) → pqseg
  117. If(αFT, αtgt - 15°, -180°) → αminFT
  118. If(αFT, αtgt + 15°, 180°) → αmaxFT

AI Drawing Prompt Reference

A 3D basketball shot simulation showing the projectile path of the ball, basket rebound behavior, and spatial relationships among the ball, hand, floor, and target. The figure includes elements such as the ball, basket, trajectory, shooter, floor plane, and target point, combining physics motion with geometric construction.
The prompt above was compiled from the original drawing commands and is for reference only.