Jump to content

Recommended Posts

Posted

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.)

Posted

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 ;)

Posted

that's a nice applet you've got there :)

 

unfortunately I can't be bothered to wade through the text atm, so I'll look later, but I'd agree that something's wrong for sure.

Posted

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.

Posted

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.

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.