Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Physics
Classical Physics
Mechanics
Understanding Physics for Coding Collision of 2 Balls
Reply to thread
Message
[QUOTE="jbriggs444, post: 6870237, member: 422467"] Don't panic. Frames of reference are not that hard. Yes, "rest frame" refers to a frame of reference where the observer moves along with one of the balls as that ball coasts toward the collision. I've always thought of a "frame of reference" as being pretty much a synonym for "coordinate system". It is like a piece of graph paper that you lay down over a physical situation so that you can read off (x,y) coordinates for all of the events of interest. If you rotate the graph paper, all of the events get new coordinates. If you work at it, you can do the trigonometry and calculate the new coordinates based on the old coordinates and the rotation angle. Or you can reverse that calculation to get old coordinates from new coordinates. You can shift the coordinate system up and across by some offset. Again, all of the coordinate values will change. Again, you can calculate new coordinates from the old ones or old coordinates from the new ones. [B]You can think about moving the graph paper across the table at a steady pace. [/B]Again, the coordinate values will change. They will change in a systematic way that varies over time. The idea is to move the graph paper so that it keeps pace with the one ball as it coasts toward the collision. After the collision, the graph paper keeps moving at that same steady pace. [You do not usually want your coordinate system to keep pace with an object that object accelerates or undergoes a collision. You usually want your coordinate system to move smoothly and steadily instead. That is, you want it to be an "inertial" frame of reference. Accelerating frames can be useful, but leave that for another day] You transform all of your old coordinates to new coordinates relative to the moving graph paper. You do the collision math using the new coordinates. Then you transform all of your new coordinates back to old coordinates and read off the result of the collision. The required transformations are easy. Let us assume that the two coordinate systems coincide at t=0. Let us use (x, y) to denote an event in old coordinates and (x', y') to denote the same event in new coordinates. Let us say that the new coordinate system is moving at ##v_x## toward the right and ##v_y## upward. The transform from old coordinates to new is then:$$x'(t) = x(t) - v_x t$$ $$y'(t) = y(t) - v_y t$$That's just two lines of code. The transform from new coordinates to old is the reverse:$$x(t) = x'(t) + v_x t$$ $$y(t) = y'(t) + v_y t$$Again, it is just two lines of code. [/QUOTE]
Insert quotes…
Post reply
Forums
Physics
Classical Physics
Mechanics
Understanding Physics for Coding Collision of 2 Balls
Back
Top