Uploaded by desth.x

Particle Collision Problem - David Estrada

advertisement
G. David Estrada H.
german.estrada@correounivalle.edu.co
The Problem
This document, addresses a common problem in the area of computer graphics, it is
required to find the angle needed to for a particle to be moved in order to make it collide with
another one, both particles have constant velocity, the angle of movement of the particle A is
known, and the angle required for be particle B must be found, both velocities are given,
coordinates in the 2d plane, there are no any kind of forces in the system and when the particle
B is thrown the velocity is constant.
𝑑𝑓 = 𝑣𝑡 + 𝑑0
Condition
𝑥𝑓𝐴 = 𝑥𝑓𝐵
𝑦𝑓𝐴 = 𝑦𝑓𝐵
We find the final positions for each component of the particles.
For A
𝑥𝑓𝐴 = 𝑣𝐴 cos 𝛼 𝑡 + 𝑥1
𝑦𝑓𝐴 = 𝑣𝐴 𝑠𝑖𝑛 𝛼 𝑡 + 𝑦1
For B
𝑥𝑓𝐵 = 𝑣𝐵 cos 𝛽 𝑡 + 𝑥2
𝑦𝑓𝐵 = 𝑣𝐵 𝑠𝑖𝑛 𝛽 𝑡 + 𝑦2
Applying the conditions, the expressions in both extremes are replaced.
𝑣𝐴 cos 𝛼 𝑡 + 𝑥1 = 𝑣𝐵 cos 𝛽 𝑡 + 𝑥2 ; 𝑒𝑥𝑝1
𝑣𝐴 𝑠𝑖𝑛 𝛼 𝑡 + 𝑦1 = 𝑣𝐵 𝑠𝑖𝑛 𝛽 𝑡 + 𝑦2 ; 𝑒𝑥𝑝2
G. David Estrada H.
german.estrada@correounivalle.edu.co
Solve for 𝒕
For 𝒆𝒙𝒑𝟏
→ 𝑣𝐴 cos 𝛼 𝑡 − 𝑣𝐵 cos 𝛽 𝑡 = 𝑥2 − 𝑥1
→ (𝑣𝐴 cos 𝛼 − 𝑣𝐵 cos 𝛽)𝑡 = 𝑥2 − 𝑥1
→𝑡=
𝑥2 − 𝑥1
𝑣𝐴 cos 𝛼 − 𝑣𝐵 cos 𝛽
For 𝒆𝒙𝒑𝟐
→ 𝑣𝐴 𝑠𝑖𝑛 𝛼 𝑡 − 𝑣𝐵 𝑠𝑖𝑛 𝛽 𝑡 = 𝑦2 − 𝑦1
→ (𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑣𝐵 𝑠𝑖𝑛 𝛽)𝑡 = 𝑦2 − 𝑦1
→𝑡=
𝑦2 − 𝑦1
𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑣𝐵 𝑠𝑖𝑛 𝛽
Both expressions are equal to 𝒕 which means they both are equivalent.
→
𝑥2 − 𝑥1
𝑦2 − 𝑦1
=
𝑣𝐴 cos 𝛼 − 𝑣𝐵 cos 𝛽 𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑣𝐵 𝑠𝑖𝑛 𝛽
Solve for 𝜷
→ (𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑣𝐵 𝑠𝑖𝑛 𝛽)(𝑥2 − 𝑥1 ) = (𝑣𝐴 cos 𝛼 − 𝑣𝐵 cos 𝛽)(𝑦2 − 𝑦1 )
→ 𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑣𝐵 𝑠𝑖𝑛 𝛽 = (𝑣𝐴 cos 𝛼 − 𝑣𝐵 cos 𝛽) (
𝑐1 =
𝑦2 − 𝑦1
)
𝑥2 − 𝑥1
𝑦2 − 𝑦1
𝑥2 − 𝑥1
→ 𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑣𝐵 𝑠𝑖𝑛 𝛽 = (𝑣𝐴 cos 𝛼 − 𝑣𝐵 cos 𝛽)𝑐1
→ 𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑣𝐵 𝑠𝑖𝑛 𝛽 = 𝑐1 𝑣𝐴 cos 𝛼 − 𝑐1 𝑣𝐵 cos 𝛽
→ 𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑐1 𝑣𝐴 cos 𝛼 = 𝑣𝐵 𝑠𝑖𝑛 𝛽 − 𝑐1 𝑣𝐵 cos 𝛽
→
𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑐1 𝑣𝐴 cos 𝛼
= 𝑠𝑖𝑛 𝛽 − 𝑐1 cos 𝛽
𝑣𝐵
𝑐2 =
𝑣𝐴 𝑠𝑖𝑛 𝛼 − 𝑐1 𝑣𝐴 cos 𝛼
𝑣𝐵
→ 𝑠𝑖𝑛 𝛽 − 𝑐1 cos 𝛽 = 𝑐2
→ 𝑠𝑖𝑛 𝛽 = 𝑐2 + 𝑐1 cos 𝛽
→ sin2 𝛽 = (𝑐2 + 𝑐1 cos 𝛽)2
→ 1 − cos2 𝛽 = 𝑐22 + 2𝑐2 𝑐1 cos 𝛽 + 𝑐12 cos2 𝛽
→ 0 = (𝑐12 + 1) cos2 𝛽 + 2𝑐2 𝑐1 cos 𝛽 + 𝑐22 − 1
→ 𝑄𝑢𝑎𝑑𝑟𝑎𝑡𝑖𝑐 𝑓𝑜𝑟𝑚𝑢𝑙𝑎
−(2𝑐2 𝑐1 ) ± √(2𝑐2 𝑐1 )2 − 4(𝑐12 + 1)(𝑐22 − 1)
→ cos 𝛽 =
2(𝑐12 + 1)
G. David Estrada H.
german.estrada@correounivalle.edu.co
→ cos 𝛽 =
−(𝑐2 𝑐1 ) ± √(𝑐2 𝑐1 )2 − (𝑐12 + 1)(𝑐22 − 1)
(𝑐12 + 1)
−(𝑐2 𝑐1 )±√(𝑐2 𝑐1 )2 −(𝑐12 +1)(𝑐22 −1)
→ 𝛽 = arcsin (
(𝑐12 +1)
)
Test
𝛼 = 15°
𝑣𝐴 = 4 𝑚/𝑠
𝑥1 = −1
𝑦1 = 2
𝑣𝐵 = 8 𝑚/𝑠
𝑥2 = 0
𝑦2 = 0
→ 𝑐1 = −2
→ 𝑐2 =
𝑠𝑖𝑛 15° + 2 cos 15°
2
𝑠𝑖𝑛 15°+2 cos 15° 2
) −1)
2
(𝑠𝑖𝑛 15°+2 cos 15°)−√(−(𝑠𝑖𝑛 15°+2 cos 15°))2 −(5)((
→ 𝛽 = arccos
5
(
→ 𝛽 = 87.23440313°
)
Download