Alternatively, join us on Discord.

Gravity Simulator [TI-84+CE]

Started by ordelore, April 13, 2017, 12:15:58 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ordelore

April 13, 2017, 12:15:58 am Last Edit: April 13, 2017, 12:29:49 am by ordelore
I made a gravity simulator during physics.
The directions should be self-explanatory. The arrow keys are used to adjust the object's mass and velocity.
I'll work on speed optimization later.
Requires OS 5.2.1 or greater because I use toString().
GIF included
Calc Wars is still alive (I hope)

_iPhoenix_

Dang it!

I was going to do something just like this, but you did it much better than I could have.
Well done, and it is a very nice program.
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

Alvajoy123

The maker of Xenon.

p2

impressive.
Could u add text with the vector data and the formulas around the lines?
Then u could actually use it in a productive way during class :)

(maybe add a tiny explosion gif in the point where they meet? :D

and btw what happens if u do parallel lines?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Snektron

Reminds me of the stuff i did during school. My calculator would often get confiscated by my physics teacher, which resulted in me talking with other students instead of minding my own calculator business. Not a smart move on her part ;D
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


p2

this was sooo much the same for me x.x
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

ordelore

Quote from: p2 on May 09, 2017, 10:48:52 pm
and btw what happens if u do parallel lines?

Because both starting positions are fixed, there is no way to have parallel lines. Also, because gravity is universal, any object travelling in parallel lines won't be doing so for long.
I initially had vector data, but the speed slowdown didn't seem worth it to me.
Calc Wars is still alive (I hope)

c4ooo

May 10, 2017, 01:18:31 am #7 Last Edit: May 10, 2017, 09:40:38 pm by c4ooo
Quote from: p2 on May 09, 2017, 10:48:52 pm
impressive.
Could u add text with the vector data and the formulas around the lines?
Then u could actually use it in a productive way during class :)

(maybe add a tiny explosion gif in the point where they meet? :D

and btw what happens if u do parallel lines?

A=F/M
Fg = M1*M2/R^2

thus

A =  (M1*M2/R^2/)/ M

Each frame: calculate A for each object, add A to velocity of the object, then add velocity to the position. The more smaller the delta time, the more accurate the simulation is. (The reason the two object shoot off so fast in the gif is becouse the distance between them becomes very close to zero, thus making A approach infinity)

If you want to moddel an object and a fixed ("on rails") planet, which is a more often occurring scenario, A =  (M1*M2/R^2/)/ M can be simplified to  A =  Mass Of Planet/R^2

Powered by EzPortal