大工至善|大学至真分享 http://blog.sciencenet.cn/u/lcj2212916

博文

[转载]【源码】网球发球曲线的仿真模拟

已有 284 次阅读 2019-5-20 20:04 |系统分类:科研笔记|文章来源:转载


用户可以自定义网球的初始位置、速度和旋转

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.


源码下载地址:

http://page2.dfpan.com/fs/clcjb221e29126c7812/ 


更多精彩文章请关注微信号:qrcode_for_gh_60b944f6c215_258.jpg



http://blog.sciencenet.cn/blog-69686-1180175.html

上一篇:[转载]【2005.08】【信息技术】基于低角度离轴摄像机的车辆分割与跟踪
下一篇:[转载]【新书推荐】【2013.11】时空信息系统:使用STK的本体论方法

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备14006957 )

GMT+8, 2019-6-20 05:04

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部