mass/gravity question
Blitz3D Forums/Blitz3D Programming/mass/gravity question
| ||
Hi, I m working on a vector engine (Vectrex like), and it needs some little physics. what I have for now is: ; Computing Gravity Vector gx = Cos(-90 + gravity_dir) * gravity_force * object_mass gy = Sin(-90 + gravity_dir) * gravity_force * object_mass ; Adding Gravity to the Object's Direction dx = dx + gx dy = dy + gy I can't think an objet of 50kg falls 50x faster than a 1kg Object. Any help on the formula? |
| ||
I thought two falling bodies of exactly the same size fall at exactly the same rate... ...but I don't know physics either. |
| ||
check the code archive and find the example called MIRRORIZE.bb that I sent last week. http://www.blitzbasic.com/codearcs/codearcs.php?code=2029 |
| ||
Everything accelerates at the same rate, regardless of size or mass. Drop a lead weight and a feather in a vacuum and they both hit the ground at the same time. |
| ||
Everything accelerates at the same rate, regardless of size or Only in Highschool Physics. In proper grownup physics although the lead wieght and the feather are pulled towards the earth at the same rate, the lead weight (assumeing that the example means the lead weight has more mass), will pull the earth towards it, more than the feather pulls the earth towards it.mass. Drop a lead weight and a feather in a vacuum and they both hit the ground at the same time. As a theoretical exercise imagine a Mass the size/shape of the earth being created within the gravity well of the earth. Now this new mass will fall towards the earth at a certain rate (When its close 9.8m per s^2). However the earth would also accelerate towards the mass (at 9.8m per s^2 when close enough), so the gap between the two objects is decreceing at 19.6m per s^2. For each object it appears that the other is falling towards it at twice the normal rate/acceration. So although the acceleration from rest for a mass and a greater mass is the same, the greater mass will hit first, because whatever it is falling towards will accelerate towards it to a greater extent |
| ||
More the object is dense, the faster it accelerates with gravity. |
| ||
More the object is dense, the faster it accelerates with gravity. Nope, the less it seems to be affected by air resistace. The density of the object is unmportant, only its mass is important |
| ||
Granted an object with large mass would hit first however, when we are talking about objects in the gravitational influence of a MUCH greater mass, those two figures would be painfully close... Gravity is a weak force, in comparison. When the effect of an iron ball the size of a house hitting the earth is compared to that of a birds feather... in a vacuum mind you, the ball would hit and the feather would be a few pico-meters behind. In other words, yes they fall at the same rate on any logical scale. And I failed physics... geesh haha |
| ||
they fall at the same rate on any logical scale As I said Only in Highschool Physics |
| ||
The OP is talking about a 'little physics' for a game. There's no need to jump on and start correcting people based on 'proper grownup' physics - 'high school' physics is what he is looking for, so Noel was in fact correct. |
| ||
'little physics' for a game Ive seen a few games where its Planets or Astorids |
| ||
@H&K - 'Proper grown up' physics is my day job, but you seem best placed to help this guy out. Don't forget to include quantum and relativistic effects in those equations. ; ) |
| ||
lol, Ha, I dont mind being wrong, its just when ppl say things that they were indoctrinated with pre-specialization, and think thay are hard and fast, such as this one. (And that the world can be shown not to be flat [Agian, the sphere is the simplest solution, not the only one], and The Big Bang is contra creationalism) Can I really mesh Gravatational effects on a planetry scale with quantum? Nice Unifiying thorey coming up. And relativly the two bodies are infact accelerating towards each other at the same rate, so any effect would be common to both. (One could argue that the Kg mass droped from the plane, is accelerating towards the earth more than the earth is accelerating towards the Kg mass, but if you replace yourself with the mass, it definatly seems that its the earth speeding to meet you) Given that the original equations where for a 2d model, I feel confident in saying that the observer is some distance away at a tangent to both these dimentions, and as no indication was given that these bodies would have a life span, I feel quite convident that any relativistic effects can be ignored. I However still feel that insuficant information was given to assume that one mass was substantaly greater than the other, infact the inclution of Dy and DX for the vector of the acceleration, would continue to give me the belief that we are talking about comparible masses orbiting each other. |
| ||
Since we are talking simple, why not just remove the whole object_mass variable out of the equation? Personally the more wacky a games play is, the more I like it. Ala, if you were playing mario of any flavor, and your character was limited to jumping only that of what a normal human could... could you honestly say that game would ever be fun, or even playable? haha. Just make something simple and looks nice. As long as you are able to produce the same results from your formula's then I say go for it. You are trying to get the results Valve did with HL2 are you? |
| ||
Thanks to all, I never thought my question will spawn so much disagreements. I only want to know if and how the mass of an object should interact with gravity forces. I m now going to check the Memorize example as _33 has suggested. |
| ||
kochon: For the purposes of a game, you should ignore mass when dealing with gravity. Unless you're trying to model celestial bodies orbiting one another. :-) In everyday life, objects with different masses will appear to fall at the same rate, unless said objects are light, and have a lot of air resistance, like a feather. In those special cases, you could either model the air resistance, or simply cheat and turn gravity down on that object. You might as well cheat, because the effect will look roughly the same. And you can then model things like balloons by using negative gravity, rather than trying to model their bouyancy by calculating how dense they are relative to the atmosphere. :-) |
| ||
Thank sswift, It seems that I won't use mass property anymore in my engine, as the user can define different gravity force and dir for each object. |
| ||
Don't give up on mass entirely. If you're doing collisions, mass can be useful for that. :-) |