抛物线公式推导详解

1.基本公式

v_0是初速度,t是时间,a是加速度,v是末速度

(1). v=v_0+at

(2). x=-\frac{1}{2} gt^2+v_0t 

(3). v^2-v_0^2=2ax

(4). \bar{v}=\frac{v_0 + v}{2}

对应自由落体公式,即v_0=0,a=g,g是重力加速度,\bar{v} 是平均速度

(1). v=gt

(2). x=-\frac{1}{2} gt^2

(3). v^2=2gx   \Rightarrow v=\sqrt{2gx}

(4). \bar{v} =\frac{v}{2}

参考文章:

匀变速直线运动的速度位移关系(重点比较中时速和中位速)

【高中】匀变速直线运动-自由落体运动


2.给定起始点P_0(x,y),目标点P_1(x,y),重力加速度g,初速度v_0,求发射角度\theta

设水平距离为X=P_1.x-P_0.x,垂直差为h=P_1.y-P_0.y

初速度v_0分解为水平初速度v_0 \cdot cos\theta,垂直速度为v_0 \cdot sin\theta

抛物线分解成两个方向,水平移动量为匀速运动,X=v_0t=v_0 \cdot cos\theta \cdot t

垂直方向移动为匀加速运动,Y=-\frac{1}{2} gt^2+v_0t \Rightarrow Y= -\frac{1}{2} gt^2+v_0 \cdot sin\theta \cdot t

如果P_0P_1Y值不相同则公式为,Y= -\frac{1}{2} gt^2+v_0 \cdot sin\theta \cdot t - h,即减掉hY= 0

为了消除t,把水平移动公式转成X=v_0 \cdot cos\theta \cdot t\Rightarrow t=\frac{X}{v_0 \cdot cos\theta},代入垂直方向移动公式

Y = -\frac{1}{2} g(\frac{X}{v_0 \cdot cos\theta} )^2+v_0 \cdot sin\theta \frac{X}{v_0 \cdot cos\theta}  -  h

展开,Y = -\frac{1}{2} g\frac{X^2}{v_0^2 \cdot cos^2\theta}  + v_0 \cdot sin\theta\frac{X}{v_0 \cdot cos\theta}  - h

简化,Y = -\frac{g X^2}{2v_0^2} \cdot  \frac{1}{ cos^2\theta}  +X \frac{sin \theta }{cos\theta}   - h

根据三角恒等式,参考链接 https://www.shuxuele.com/algebra/trig-magic-hexagon.html

\frac{1}{ cos^2\theta} = sec^2 \theta , sec^2 \theta = 1 + tan^2 \theta

\frac{sin \theta } {cos \theta} =tan \theta

得,Y=-\frac{g X^2}{2v_0^2} \cdot  ( 1 + tan^2  \theta  )  +X \cdot  tan \theta  - h

再展开,Y = -\frac{g X^2} {2v_0^2} - \frac{g X^2} {2v_0^2}  \cdot tan^2 \theta + X \cdot  tan \theta - h

整理得,Y=  -\frac{g X^2}{2v_0^2}  \cdot tan^2 \theta   +X \cdot  tan \theta   - h  -\frac{g X^2}{2v_0^2}

得到一个以tan \theta为末知数的方程,其中a=  -\frac{g X^2}{2v_0^2} ,  b=X , c=   - h  -\frac{g X^2}{2v_0^2}

最后用一元二次方程的公式解方程

如果 \Delta = b^2-4ac < 0,则方程无解,等于0两个解相同,大于0两个解

把a,b,c代入公式,x=\frac{-b\pm\sqrt{b^2- 4ac} }{2a}

tan \theta_1 = \frac{-\frac{g X^2}{2v_0^2} + \sqrt{X^2 - 4 \cdot (-\frac{g X^2}{2v_0^2}) \cdot  (- h  -\frac{g X^2}{2v_0^2} )} } {2 \cdot (-\frac{g X^2} {2v_0^2})}


tan \theta_2 = \frac{-\frac{g X^2}{2v_0^2}   - \sqrt{X^2 - 4 \cdot (-\frac{g X^2}{2v_0^2}) \cdot  (- h  -\frac{g X^2}{2v_0^2} )} }{2 \cdot (-\frac{g X^2}{2v_0^2})}

最后 \theta_1 =  atan(tan \theta_1),\theta_2 =  atan(tan \theta_2)

参考文章:https://zhuanlan.zhihu.com/p/99477136



3.给定起始点P_0(x,y),目标点P_1(x,y),重力加速度g,发射角度\theta ,求初速度v_0

求初速度与求发射角前部份公式相同,即

Y = -\frac{g X^2}{2v_0^2} \cdot  \frac{1}{ cos^2\theta}  +X \frac{sin \theta }{cos\theta}  - h

当Y=0时, \frac{g X^2}{2v_0^2 cos^2\theta} =  \frac{X sin \theta }{cos\theta}   - h

\frac{1} {v_0^2 } = \frac{ 2 cos^2 \theta ( \frac {X sin \theta } {cos \theta} - h) } {g X^2}

v_0 = \sqrt \frac{g X^2} { 2 cos^2\theta (\frac{X sin \theta }{cos\theta}   - h)}

v_0 = \sqrt \frac{g X^2} { 2 cos^2\theta (X \cdot tan \theta   - h)}

v_0即是初速度

参考文章:https://physics.stackexchange.com/questions/60595/solve-for-initial-velocity-of-a-projectile-given-angle-gravity-and-initial-and?rq=1 第二个回答



4.给定起始点P_0(x,y),目标点P_1(x,y),重力加速度g,最大高度,求初速度

抛物线

desmos实现 https://www.desmos.com/calculator/vw2esabqru

实现步骤,假定初速度为0

s=x_2-x_0,h=y_2-y_0

根据v^2-v_0^2 = 2gh公式,由于初速度为0,v^2 = 2gh,得到垂直初速度

v_y=\sqrt{sgh}

再求水平初速度,分开为两段,根据公式x = -\frac{1}{2} gt^2 \Rightarrow t = \sqrt {\frac {2x} {g} }

t_1 = \sqrt { \frac {2h_m} {g} }

t_2 = \sqrt { \frac {2h_m - h} {g} }

得到总时间 t = t1 + t2 ,将水平距离除以总时间,得到水平初速度

v_x = \frac{s} {t}



5.初速度与距离在3D空间里的里转换

V0 为初速度向量

水平分量 Vx = Vector3.ProjectOnPlane(V0, vector3.up)

垂直分量  Vy = Vector3.Project(V0, Vector3.up)

3D空间里的距离,起始点 startPos,目标点targetPos

startPos.y = targetPos.y = 0

水平距离 s = Vector3.Distance(startPos, targetPos)

6.更多资料

这里面Iron-Warrior写了一个例子,github上能下到

How to calculate force needed to jump towards target point?

Solve for Initial Velocity of a projectile given Angle, Gravity, and Initial and Final positions?

Solving for initial velocity required to launch a projectile to a given destination at a different height

Find projectile speed given maximum height and range.

https://www.omnicalculator.com/physics/projectile-motion

Unity 已知落点和速度自动计算发射角度

Unity 计算导弹抛物线弹道和转向

Unity C# 计算导弹抛物线弹道和转向

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。