1. Re: bullet code (was ICONS - dead horse)
- Posted by George Walters <gwalters at SC.RR.COM> Feb 07, 2000
- 349 views
Here are the correct equations: X = X0 + VX * T Y=Y0 +VY * T - .5G * T * T VX = V* COS(ANGLE) VY = V * SIN( ANGLE) V = initial velocity at some angle above the ground X0 AND Y0 are initial positions and could be zero ..george -----Original Message----- From: David Roach <roachd_76 at YAHOO.COM> To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU> Date: Monday, February 07, 2000 4:31 AM Subject: Re: bullet code (was ICONS - dead horse) >I have found some errors in your equations. If you are going to tell >me that my code looks like chicken scratch at least have your information >correct. I was just looking to see if I maybe overlooked something. I am >new to programing. I have only done one program in euphoria. Maybe two in >qbasic. You seem like a very lighthearted person so don't >take this the wrong way. > >you wrote: >y=vy*t - .5*g*t*t > >In dealing with a "projectile" that is launched horizontaly(I'll get into >angles later) there are >two simple equation for x and y axis. They are, > >x axis: >x = v * t > >y axis: >y = .5 * g * t^2 > >This is all you need. Where your equation above for 10m/s at 1 sec tells >us that the object fell 5.1 meters the one I use (that I got out of a >physics) >book marks the object at 4.9 meters. I believe what you have there is >the vertical *component* of an objet launched at an angle which is >y = vy * t + .5 * g * t^2. >If I have inserted foot in mouth please let me know. But I believe this is >correct. Oh also go back and take a look at your first equation and >my equation the only diffs are that I take into acount that I don't start >on 0,0 coords but 50,300 coords other than that they are almost identical. >You have reproduced my chicken scratch. > >Any one feel free to jump in please. Gee I didn't know my foot stank that >bad. > > > >roachd_76