本文主要是介绍【源码】网球发球曲线的仿真模拟,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
用户可以自定义网球的初始位置、速度和旋转。
The user defines the initial position, velocity, and spin of the tennis ball.
单位分别是磅、英尺、秒。
The units are pounds, feet, seconds.
网球场坐标为:
X-平面,垂直于网格
Y-平面,平行于网格
Z-离地高度
The tennis court coordinates are:
x - ground, perpendicular to net
y - ground, parallel to net
z - height above ground
网球路径取决于3种作用力:
1)重力
2)阻力
3)升力
The path taken depends on 3 forces:
1) gravity (constant 32 ft/s^2 in -z direction
2) drag (proportional to v^2 and in -v-hat direction
3) lift (proportional to cross product of spin and velocity)
阻力的比例常数与大气密度、球的横截面积、阻力系数和质量的倒数成正比:
The proportionality constant of the drag force is proportional to the atmosphere density, the cross-sectional area of the ball, the coefficient of drag, and the inverse of mass:
k_D = C_D*rho_atmosphere*area/(2*mass)
球的旋转使它上升。表达形式为:
Spin of the ball causes it to lift. The constant has similar form:
k_L = C_L*rho_atmosphere*area/(2*mass)
旋转将增加发球时的误差范围。
Spin will increase the margin of error when serving.
上旋(+y分量)产生向下的力,使球落下,需要发球者以更大的初始角度击球。
A top-spin (+y-component) creates a downward force causing the ball to drop and allowing the server to hit the ball at a greater initial angle.
通过将y分量设置为负值,可以产生”回旋球“。
Backspin is created by setting the y-component to a negative value.
网球曲线是通过4/5阶的龙格-库塔-费尔伯格方法进行求解的。
Propagation is via a Runge-Kutta-Fehlberg method of order 4/5.
模型标记条件:球弹出球场、球撞网或球反弹。
The model flags conditions: ball moves out of court, ball hits net, or ball bounces.
反弹是用一个恢复参数来建模的,如果存在旋转,则是一个夹点参数,用于根据与地面接触时的滑动来更正速度。
The bounce is modeled with a restitution parameter and, if there is spin, a grip parameter to modify the velocities based on slipping during contact with the ground.
本代码有助于分析网球比赛的视频,以对发球初始条件进行反向工程,进行游戏模拟,以及“最终位置对初始发球位置、速度和旋转有多敏感”等假设问题。
Useful for analyzing video of tennis games to reverse-engineer initial conditions of a serve, for game simulations, and for what if questions such as "How sensitive is the final position to the initial serve position, velocity, and spin?"
网球运动在火星上会是什么样子的?
"What would tennis look like on Mars?"
空气密度如何影响网球的发球?
"How does atmospheric density affect tennis serves?"
参考文献:
Danby, J. M. A. (1997) Computer Modeling: From Sports to Spaceflight ... From Order To Chaos, Willmann-Bell, Inc., Richmond, VA., p. 159.
这篇关于【源码】网球发球曲线的仿真模拟的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!