Jump to content
  • Advertisement
Sign in to follow this  
ok_woei

Calculate the reflected path

This topic is 4235 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I am trying to work out a physics engine which a particle is bouncing inside a sphere. You guys have any idea on how to calculate the reflected path of the particle after the particle hit the boundary of the sphere.

Share this post


Link to post
Share on other sites
Advertisement
It will be reflected across the axis of the radius.

More specifically, a projectile's path will be reflected of the normal of the surface it impacts. In a sphere, all surface normals in the radial direction.

Share this post


Link to post
Share on other sites
So in this case, the angle (with respect to surface normal) of the path before impact is same as the angle (with respect to surface normal) of the path after impact?

Share this post


Link to post
Share on other sites
Exactly so.

If you take a simple example, a ball bouncing off of flat ground elastically, the impact is purely in the vertical direction. That means only the vertical velocity is changed, and the horizontal velocity isn't affected at all. So the vertical velocity is simply reversed, and the horizontal velocity is unchanged; that means that the angle of impact is the angle of reflection, much like light reflecting off a surface.

This can be more generalized to the ball's velocity in the direction of the surface normal is reversed, while the velocity tangent to the surface is unchanged. (Again, for elastic collisions.)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!