Live data from Hacker News

Gravity Simulator

nowykurier.com

21–30 of 135 posts

Re: Gravity Simulator

#22
Would love a setting to select the number of objects to drop on click, and the spread for them ie (20 objects, 50px radius) and also for objects to gain the mass of objects that hit them, so that if a bunch of huge objects collide, they create a super-object

Re: Gravity Simulator

#23
post #22

Would love a setting to select the number of objects to drop on click, and the spread for them ie (20 objects, 50px radius) and also for objects to gain the mass of objects that hit them, so that if a bunch of huge objects collide, they create a super-object

> for objects to gain the mass of objects that hit them, so that if a bunch of huge objects collide, they create a super-object

That's already what happens here.

Re: Gravity Simulator

#25
post #11

Quote: "Particle mass is log of radius". Why not use real physics and make the mass proportional to the cube of the radius? It's also easier to compute. In fact, taking the log of the radius goes in the wrong direction -- the mass of a planet really does increase as the cube of its radius, which changes in a way opposite to log(). Oh, well. Here's my gravity simulator -- it uses JavaScript, no flash required: http://…

> "Particle mass is log of radius"

They seem to have corrected the sentence now: "particle radius is log of mass".

Wow, your simulator is much nicer, plus a great article about it to boot! You should add an option to play cosmic billiard, that's probably the main appeal of the flash simulator :)

Re: Gravity Simulator

#30
Built something similar in C/GL a few years back. Quite a fun exercise, it only took a couple of hours to get the basics working. It has no collision detection, so particles that end up too close end up with infinite velocity, which is quite fun to watch.

EDIT: oh hey, I found a binary. https://www.dropbox.com/s/ihfqnzjaxhtskwt/Screenshot%202014-...

https://github.com/quarterto/Yay-Physics

Post reply on HN