3 ms·
If it somehow did hit exactly right angles into the corner, wouldn't it then be stuck bouncing between diametrical corners? In fact I don't see how it ever cou
by dingaling 2y ago
If it somehow did hit exactly right angles into the corner, wouldn't it then be stuck bouncing between diametrical corners?
In fact I don't see how it ever could hit a a corner exactly.
- NAR8789 2y agoTry on paper originating it from a corner on a rectangle where the initial path is just offset from the diametrical corner.
- sopooneo 2y agoYou clearly know more about this than me, because I'm currently Googling to understand what "diametrical corners" are. But in a simple implementation, wouldn't the x and y velocities both be reversed at once with a corner hit, both side and top/bottom collisions having been detected "at once" in the same part of the code between updating positions? And then the logo would just bounce out exactly the way it came in?
- lupire 2y ago"diametrical" is fancy for "opposite". You are correct.
- Retr0id 2y agoHere's the math: http://lostmathlessons.blogspot.com/2016/03/bouncing-dvd-logo.html http://lostmathlessons.blogspot.com/2016/03/bouncing-dvd-log...
- Aditya_Garg 2y agoOnly if the tv is a square, which most tvs are not.
- Keyframe 2y agolet's wait and see https://codepen.io/CaptainKeyframe/pen/eYKQVKE https://codepen.io/CaptainKeyframe/pen/eYKQVKE
- matt-attack 2y agoCurious to know if you’re under the presumption that TVs are square? Or are you imagining that the logo doesn’t move at 45 degrees? Both seem obviously false but I’m struggling to think how someone could otherwise have come to your conclusion.