Posted: Sun Mar 23, 2008 1:14 pm Post subject: Useful formulas for 2d physics?
Ive looked all over the internet, and I cant seem to find what formulas I need to implement 2d physics into a game. I cant find a formula for earth gravity on an object with a certain mass, a formula to tell me how an object would spin when struck in a certain position with a certain velocity, I cant seem to find anything .
Ive been to a dozen physics sites and they all just seem to have simple highschool level equations that dont help whatsoever.
So what Im asking, is could someone please help me find the equations I need, or at least point me towards a site that has useful equations? Thanks
Sponsor Sponsor
Tony
Posted: Sun Mar 23, 2008 1:28 pm Post subject: Re: Useful formulas for 2d physics?
superjoebob @ Sun Mar 23, 2008 1:14 pm wrote:
simple highschool level equations that dont help whatsoever.
Simple 2D physics, as you're asking about, are covered in grade 11 Physics class. It might be a good idea to pick up a book and follow the reasoning behind all the formulas, rather then simply plugging them in and hoping that the result "looks right"
Posted: Sun Mar 23, 2008 1:51 pm Post subject: Re: Useful formulas for 2d physics?
to be honest i dont even know were to start, I cant see were to fit in equations, what to plug in were, anything. What I need is a visual to look at and learn from. Is there any tutorial that shows how to go from scratch to simple box on plane physics?
Actually, a good basis is how does v(t) work? what variables do i plug in? It all seems so abstract, I just cant see how to apply these formulas to create movement
LaZ3R
Posted: Sun Mar 23, 2008 2:55 pm Post subject: RE:Useful formulas for 2d physics?
Did you take grade 11 physics....
Better yet, grade 11 Math.. :S
asking "how does v(t) work" leads me to believe you haven't. Go with Tony's suggestion of picking up a book and following the reasoning behind everything.
A formula is pretty useless if you don't know what the variables are, nor understand how each one has any relation to eachother. You COULD plug in numbers into a formula, but understand what the result really means has a lot more significance to solving problems.
Sean
Posted: Sun Mar 23, 2008 3:32 pm Post subject: Re: Useful formulas for 2d physics?
Physics Equations are listed in the back of any agenda from school.
But, Tony and them are right, you won't understand them until you take the course, and that's what I am doing next year.
jernst
Posted: Sun Mar 23, 2008 4:08 pm Post subject: Re: Useful formulas for 2d physics?
superjoebob @ Sun Mar 23, 2008 1:14 pm wrote:
Ive looked all over the internet, and I cant seem to find what formulas I need to implement 2d physics into a game. I cant find a formula for earth gravity on an object with a certain mass, a formula to tell me how an object would spin when struck in a certain position with a certain velocity, I cant seem to find anything .
Ive been to a dozen physics sites and they all just seem to have simple highschool level equations that dont help whatsoever.
So what Im asking, is could someone please help me find the equations I need, or at least point me towards a site that has useful equations? Thanks
All you really need for most of the stuff you want is high school level physics, like the guys above said you could learn everything you need in a high school physics class or even maybe find what you're looking for on some websites. For example, this site has some stuff on gravity http://www.glenbrook.k12.il.us/GBSSCI/PHYS/Class/circles/u6l3c.html and this site has some stuff with collisions http://www.myphysicslab.com/contact.html
superjoebob
Posted: Sun Mar 23, 2008 4:29 pm Post subject: Re: Useful formulas for 2d physics?
alright... hopefully something will make sense because most of the things ive read so far are incredibly confusing
superjoebob
Posted: Thu Mar 27, 2008 12:50 am Post subject: Re: Useful formulas for 2d physics?
Ok Ive read pages upon pages of stuff about physics and the formulas that I cant understand but I still cant figure out were to plug in the formulas! Could someone please help me? Were do I plug the physics formulas in to control x and y position and rotation?
Sponsor Sponsor
syntax_error
Posted: Thu Mar 27, 2008 1:02 am Post subject: RE:Useful formulas for 2d physics?
First and for most do NOT just plug in random formulas hoping to get the right effect. Math formulas are a TOOL used by programmers to achieve there desired goal, so do not simply look to fit random formulas here and there to make your code look more advance.
EDIT: also next time use the edit button as I have instead of double posting.
superjoebob
Posted: Thu Mar 27, 2008 1:18 am Post subject: Re: Useful formulas for 2d physics?
Sorry, if id have used the edit button this topic would still be at the bottom, therefore no one ever would have seen it.
Im not trying to just "plug in formulas" Im trying to figure out what sort of variables to even use with formulas, and how to use the results.
I can see im obviously not getting it, because I havent got a clear answer yet, everyone just seems to keep making it sound more and more abstract. Isnt their anything I need to know, maybe a basis for programming physics because I feel like im trying to fly a plane here
richcash
Posted: Thu Mar 27, 2008 2:59 am Post subject: RE:Useful formulas for 2d physics?
What are you trying to do? How far have you gotten?
How much programming do you know? Is it just the math/physics you are having problems with or coding also?
Robert
Posted: Thu Mar 27, 2008 7:29 am Post subject: Re: Useful formulas for 2d physics?
Tony @ Sun Mar 23, 2008 1:28 pm wrote:
superjoebob @ Sun Mar 23, 2008 1:14 pm wrote:
simple highschool level equations that dont help whatsoever.
Simple 2D physics, as you're asking about, are covered in grade 11 Physics class. It might be a good idea to pick up a book and follow the reasoning behind all the formulas, rather then simply plugging them in and hoping that the result "looks right"
You learned angular velocity in grade 11 physics? I would like to go to that school.
Superjoebob, ignore everyone who is telling you to wait untill you have taken a physics course. Take the initiative to teach yourself the concepts in your spare time, and once you have a good grounding in the material, you should be able to translate it into a physics engine without too much difficulty (assuming you already have experience with programming).
Mackie
Posted: Thu Mar 27, 2008 11:38 am Post subject: RE:Useful formulas for 2d physics?
MIT has a very... interesting teacher who has all of his physics lectures as open, free course ware. You can find all of this online at:
I found those really interesting, fun and helpful.
Wow thats a pretty good find, Ill check that out, thanks
Yes, I have a good knowledge of programming but thus far I dont know how to even make the formulas come out with legitimate numbers. Its like having the most useful thing on earth but not knowing how to turn it on
Quote:
Superjoebob, ignore everyone who is telling you to wait untill you have taken a physics course. Take the initiative to teach yourself the concepts in your spare time, and once you have a good grounding in the material, you should be able to translate it into a physics engine without too much difficulty (assuming you already have experience with programming).
I sure hope so, because nothing makes sense thus far
I Smell Death
Posted: Tue May 06, 2008 9:39 am Post subject: Re: Useful formulas for 2d physics?
acceleration due to gravity is 9.804 m/s^2 [down]
a force can be modeled by the following equation F=ma
where
F is the force in newtons
m is the mass in Kg
a is the acceleration in m/s^2
Normal force is the force that a surface applies to an object to prevent it from passing through it, ex the force a table applies on a book to keep the book on the table. The normal force pushing away from the surface must be exactly equal to the force that is pushing towards the surface.
normal force can be determined by Fn=-Fg when nothing is pushing down on the object
where
Fn is the normal force in newtons
Fg is the force of gravity in newtons
Ex: 980.4 N = - ( 100 * -9.804 )
static friction (when an object is not moving) is modeled by Ff=?Fn
where
Ff is the force of friction in newtons
? is the coefficient of static friction between two materials (predetermined value)
Fn is the normal force in newtons
Ex:
in this case we'll use the coefficient of static friction for steel on ice which is 0.1
Ff = ? Fn
-98.04 N = 0.1 * ( -980.4 )
kinetic friction (when an object is moving) is modeled by Ff=?Fn
where
Ff is the force of friction in newtons
? is the coefficient of kinetic friction between two materials (predetermined value)
Fn is the normal force in newtons
Ex:
in this case we'll use th coefficient of kinetic friction of steel on ice which is 0.05 (not the same as static)
Ff = ? Fn
-49.02 N = 0.05 * ( -980.4 )
Note that the coefficients of kinetic friction and static friction are not the same, but the equations are so a single function coule be written and use for both types of friction with the normal force and coefficient of friction being passed to it.
Here is the equation that can give us distance knowing an initial velocity, final velocity and acceleration.
Vf^2 = Vi^2 + 2 * a * d
where
Vf is the final velocity in m/s
Vi is the initial velocity in m/s
a is the acceleration in m/s^2
d is the distance in meters
Ex:
2^2 = 4^2 + 2*(-0.5)*d
4 = 16 + (-1)*d
-12 = -1 * d
12 = d
here is an example of how these would apply.
Ex:
a rolling metal ball, with a mass of 2 Kg, on ice at a velocity of 1 m/s [right], with a coefficient of kinetic friction of 0.05. when does it stop?
Force of gravity:
Fg = m a
Fg = 2 * -9.804
Fg = -19.608 N [up]
Normal Force: Because nothing is pushing down on the ball the normal force is equal to the force of gravity.
Fn = -Fg
Fn = 19.608 N [up]
Force of friction (kinetic): kinetic because the ball is moving.
Ff = ? Fn
Ff = 0.05 * 19.608
Ff = 0.9804 N [Left]
Ff = -0.9804 N [Right]
decelleration: since we do not have an equation for decelleration, we will rearrange the first one
F = m a
F / m = a
plug Ff and m into the equation
-0.9804 / 2 = a
a = -0.4902 m/s^2 [Right]
now we neet to plug this into an equation to find when the velocity is 0
Vf^2 = Vi^2 + 2*a*d
rearrange to find d
( Vf^2 - Vi^2 )/( 2*a ) = d
( 0^2 - 1^2 )/( 2*-0.4902 ) = d
-1/-0.9804 = d
d = 1.0199
therefore it takes the ball 1.0199... meters to stop rolling