Jump to content

Flash Gravity Model Erroneous, Help Please


alt_f13

Recommended Posts

http://www.djglacial.com/gravity/

 

^ This is a gravity model. For some reason that I cannot determine, the time scales are completely wrong, by about 40000 days per second of the simulation.

 

You can find the code at http://www.djglacial.com/gravity/code.txt

 

and a full browser version of the sim at http://www.djglacial.com/gravity/gravity.swf

 

Please help me figure this out !!!!

 

Knowlege of Flash ActionScript or BASIC could help, but not neccessary.

 

Keep in mind this is Gr12 physics, so you physics buffs should not have much of a problem spotting the problem (which is probably just a dumb math problem, not a physics problem.)

Link to comment
Share on other sites

I cant believe this subject is SO boring that it only got ONE view besides me... let alone a reply.

 

o_0

 

I would be appreciative of any help, as I just cannot spot the problem after a few weeks of coming back to it.

 

Edit - I even color coded the variables ;)

Link to comment
Share on other sites

Ill look through it and post again in a bit.

 

Right now, when it should be 365 days per second, and the radius of the orbit is the same as earths, it should take about one second for the planet to orbit the sun in the simulation. However, I have to boost the days per second to 40000 days per second for it to appear right.

 

I will make a modification so that the planet orbits at the proper distance when the app starts and when you press a button. That will make the error more apparant.

Link to comment
Share on other sites

Wow, this is very unorganized. Rather than using vitual data, it makes calculations based on the objects position in the app itself. I am going to rewrite this and post again a little later, hopefully with an error free version.

 

You can still take a look at the code, perhaps spot the problem. But don't think too hard about it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.