Re: Any mathematicians out there?
- From: "Rick Rothstein" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 11:36:04 -0400
I am working on a ricochet function, which allows a shape\object to have a
bounce effect when it hits a wall in a 2 dimensional environment. I'm
confused on how I calculate the angle after it hits the wall. Which
trigonometric function do I use? How do I turn that into coordinates?
I'm not concerned about the speed reduction after it hits; I want to keep
it
simple.
How is the wall defined (coordinates of two points on the line, the equation
of the line itself, something else)? How is the path the object is traveling
on defined (two coordinates along its path, equation of the line the path
makes, something else)? Basically, the angle the path makes with the wall
coming in will equal the angle the path (after impact with the wall) makes
when leaving.
Rick
.
- Prev by Date: Re: Any mathematicians out there?
- Next by Date: Re: Passing pointers to User Defined Types between VB EXE and DLL
- Previous by thread: Re: Any mathematicians out there?
- Next by thread: Re: Any mathematicians out there?
- Index(es):
Relevant Pages
|