   introducing new advanced physics equations to the public, help me spread?
  "I really want to spread this in the game dev community since it would make things easier and better for many people."To think that I was pushed to this action is unthinkable to me. Obviously good intentions, a year of hard work, and a kind gesture means rude, I'm wrong, I'm false, You're crap at typing. Well then...sorry for having an energy disorder that I have to take 4 medications for daily causing me to not sleep for 30-40 hours right now. On top of being ill due to my disorder and eager to help others I seemed to have forgotten to proofread. So my ill typing habits, slurred grammar, and not too concise rough draft was submitted in place of what I normally present. So in response to my agreements of these horrid conditions in what I posted, stating that I am currently proofreading them for your viewing, I am still constantly told to basically gtfo kid. I know that this is a very bad thing to do on a forum moderators, I too work in administration and have banned people for raging about our servers in text and voice. Though I feel compelled to state:What a GREAT impression you guys made on me, this community surely is the world's NUMBER ONE community.And thus the moderator said UNDELETE!Yeah so ive been working with a calculus doctrine teacher and the physics teacher at school for months on this. My goal was to make a single physics equation that had momentum and velocity that only needed initial velocity and mass. This would easily be added onto a force based engine and could be used as a single equation physics simulator.Well we did it and ive been verifying it for several months now. Its fraking huge so its a copy paste equation for sure. I have written a txt on the math approach, purpose, and implimentation for it and by accident it impliments kinetic energy as well. Its around 130 lines long so its very thorough even for people new to physics and game development.I really want to spread this in the game dev community since it would make things easier and better for many people.Just as an example of how powerful this one equation is, u can simulate a dynamic psuedo wind tunnel with ONE equation.Im open to suggestions on how to spread this txt file, i havent hosted it anywhere yet cus i figured u guys would know best for that. =]----edit----1st suggestion was to paste here...so here goes nuthin.(not using [ source] due to my enters not carrying over in it, testing without now)vf2=-(-m2*(m1*vi1+m2*vi2)/m1+sqrt(-m2*(m1*vi1+m2*vi2)^2/m1+vi2^2*m2^3/m1+vi1^2*m2^2+m2^2*vi2^2+m1*m2*vi1^2))/(m2^2/m1+m2)vf1=((-m2*(m1*vi1+m2*vi2)/m1+sqrt(-m2*(m1*vi1+m2*vi2)^2/m1+vi2^2*m2^3/m1+vi1^2*m2^2+m2^2*vi2^2+m1*m2*vi1^2))/(m2/m1+1)+m1*vi1+m2*vi2)/m1variables: m1 = mass of object 1m2 = mass of object 2vi1 = initial velocity of object 1vi2 = initial velocity of object 2vf1 = final velocity of object 1vf2 = final velocity of object 2(If u just want to know how to use it/what its for skip approach if u dont want to know the math behind these fraking huge monsters of an equation.)approach:momentum - p=mvkinetic energy - K=1/2mv^2The two equations for vf impliment both momentum and kinetic energy, making them even more fine tuned for simulating physics.Since mv universaly can be seen as momentum, the kinetic energy equation has momentum in it as a factor.For an elastic object collision the kinetic energy is maintained. Ki1+Ki2=Kf1+Kf2My physics simulator will only support elastic collisions due to the fact that enelastic objects have a completely seperate area of physics that i can not yet come to even learn. ex: a ball of clay hitting the table and spreading out is an enelastic collision.Thus using the 1/2m1*vi1^2+1/2m2*vi2^2=1/2m1*vf1^2+1/2m2*vf2^2 kinetic energy equation for elastic collisions one can use the m1*vi1+m2*vi2=m1*vf1+m2*vf2 momentum equation since its near identical in context.Solving for vf1 and vf2 in the momentum equation produces vf1=(m1*vi1+m2*vi2-m2*vf2)/m1 andvf2=(m1*vi1+m2*vi2-m1*vf1)/m2Upon seperately plugging each equation into the kinetic energy equation, u have two modified kinetic energy equations with only one unknown variable left. Which are either vf1 or vf2.Do not even attempt to then simplify those two equations solving for vf1 and vf2. I did with a calculus teacher and after 3 weeks our final equations were wrong. I wound up getting microsoft math and it did it for me, it even had the option to copy paste the visual equation as line format. It is a REALLY powerful program with extraordinarly high level AI that can do absolutely anything math related.As to why the two equations came out differently, it is due to a very minor displacement of where the unknown variable lies within the process of simplifying. I have absolutely no idea what tho, but it happened to us on paper as well...even though it didnt work.On a second to last note: Do not even try to use these on a graphing calculator. They will work just fine, but plugging this equation in with values is a nightmare. It filled 2/3 of my screen and i had a typo i couldnt find. Frustrating as heck.On a last note: Do not question the accuracy and validity of the momentum and kinetic energy implimentations. I spent 7 hours over an AP calculus text book and reviewed the true form and meaning of both equations. My conclusion came out as a better understanding of momentum and kinetic energy, and makes these implimentations truely concrete to my knowledge. And no i will note type up an explanation of this portion. My mind is numb just thinking about it any more. It would take up to 500 lines of text to explain it and i am not up for that.purpose:To formulate an equation that impliments momentum for change in velocity upon object collision that uses variable data that ANY engine with physics on ANY scale would have or easily get. Even though two equations were the result of our work, they both have the same purpose. Kinetic energy wasnt even an intention actually, it just came to be that that was the only way to do it and it came with an upside. I am currently working with a friend in Flash as3 and/or Flex to test these equations in a live user influenced environment, as an example of their power and benefit in use.implimentation:The best approach to using these equations would be to have any objects come with their mass already stored in them or upon creation. Have any object/instance/class/whatever thats using one or both of these equations initialise with a velocity variable. In every new tick of the app/game that velocity variable will be the initial velocity due to the fact that it was the final velocity of the previous tick and the engine has moved forward in time. At the end of each tick or somewhere in the middle, have a collision detection setup of ur own design and in reaction to a collision use the vf1 equation with object 1 being self. In this case u only need the vf1 equation due to the fact that both objects will detect the collision and find their own final velocity. Do NOT forget to store this vf1 output in the previously mentioned variable velocity. If u may now find the vf2 equation to be pointless ur dead wrong. I formulated it as well in order to allow nifty AI tricks. If an object knows its own change in velocity, as well as the change in velocity of what hit it, it can react accordingly. ex: imagine having an object chase after whatever hit it if its "running away" else if its "taking a stand" examine the object and determine if its safe or not, then u have the object react however u want to the situation. This is better due to the fact that u can instantly determine if the other object will be close or near in the same tick. Rather than using a timer based AI that checks after an x amount of time. The timer approach wouldnt be as fluid as a velocity approach. Also, this is NOT A VECTOR EQUATION. It takes only ints, doubles, vars, whatever...and outputs only that of such. Its a basic math equation so u have to have an Xvel and Yvel, meaning run the equation twice, once for each. For those of u who want the vector velocity(magnitude) its found using sqrt(Xvel^2+Yvel^2) and the direction in angle format on a 0-180-(-180) scale (dont use 0-360 because raytracing AI will not work 90% of the time on a 0-360 scale when using delta on the angles, the 0-180-(-180) works fine -90 is 270 -10 is 350 etc.) is found using tan(Xvel/Yvel) works for radians too...and a 0-pi-(-pi) scale is better fyi. Another handy use of knowing this velocity is the fact that u know ur tick time. Since v=d/t u can find out how far the object will move before it does so using d=vt. Remember to use a pixel to meter ratio factor for any and all physics related distance/displacement equations, as well as a meter to pixel ratio factor to know the XY distance/displacement. Same math applies here for vector data. Possibly the coolest application of vf2 would be to simulate psuedo air turbulance. ex: the floor tests for Y distance between self and all objects. Any objects that are under...ooh say 150 delta it applies an upward velocity to the object, with the mass on the floor side to be the object's delta with floor in Y divided by oooh say 3? This would result in slower falling objects to slow down faster and higher up than quickly falling objects that would dive deep then bounce up and down till it settles like a fruit in water. This would be a basic vertical air chamber simulation, but just imagine magnets pushing apart or having a game made out of it...id like that. All without any static sinusoidal tricks and natural physics reactions making it life like and realistic. The possibilities are endless. I could go on and on, but just give me any ideas u come up with and would like to share. gunuse.the.furdragon@gmail.comAlmost forgot..for those of u new to physics u can find displacement due to velocity with d=vt as a simple approach, or if u want to include force that is already present in ur engine do the following steps in ur code:1) find vf1 or vf2. U can use either one in the following steps.2) d=vf*t+0.5*a*t^2 I know its vi in physics but to impliment momentum and forces, the velocity resultant of momentum is ur vi for forces. Its like a layered tier system.3) d is the displacement in that one tick for x or y, whichever u did.4) u find time t thru ur tick, using a sound way of delta and system time in ms or less.5) a is found thru the equation F=ma. ur acceleration a is Force/mass F/m6) The same vector math still applies of course.If i have missed anything or if i need to add something email me at gunuse.the.furdragon@gmail.comPS: u may also email me requesting images of the two equations produced by microsoft mathhaha wow it fits...im impressed XP[Edited by - Promit on February 12, 2010 10:18:39 AM]
Quote:Original post by GunuseTheFurdragonIts fraking huge That's what she said.I think the best way to spread it is to actually spread it. Just copy/paste it here. I'm sure you'll get insta-feedback.   ;  Do u REALLY think it wise to paste a 130 line txt file in a thread? If it is then i'll edit this right away =P--edit--mmmyeah now that i think about it more it would get more attention and get used faster. i'll paste it here as first suggestion then.   ;  You can use the [ source] [ /source] tags for thread readability.   ;  I can go one better and simulate an *actual* dynamic wind tunnel with one equation (none of that "pseudo" wind tunnel stuff here!)...WindSpeed += (DeltaTime * WindSpeedChangeRate);;Quote:Original post by HinchI can go one betternnnno u cant, that does not impliment real time momentum and impulse forces nore kinetic energy conservation.;  Is this a joke? I can't really tell...   ;  No..it is not a joke. I have spent months compressing physics into one equation as much as possible and this is the end result with a manual.----edit----Ok no man can say they have done as much as possible in math. If u actually see something more i can impliment, please do tell. I am open to everything as i state in the 'manual'.   ;Quote:Original post by GunuseTheFurdragonhaha wow it fits...im impressed XPThat's what sh.. lol. I'm looking forward for someone to take the time to understand this and tell us what's all about.   ;  I get too many "thats what she said"...everywhere all the time...still dont know why they come out of me so much. D:Anywho im actually disappointed that u couldnt understand this, if u could, please tell me what to improve or modify to make it more clear?   