Live data from Hacker News

Gravity Simulator

nowykurier.com

51–60 of 135 posts

Re: Gravity Simulator

#51
Can anyone explain the graphical effects that appears here in the white lines https://i.imgur.com/sRCLAsn.png https://i.imgur.com/81Jf56H.png?

(To reproduce, use a really big stable mass (either enter it by hand or use the OMFG button and click several time at the same position without moving your mouse) and launch at fast speed a tiny particle in an approximately tangent direction of a circle centered on the big mass.)

Re: Gravity Simulator

#52
post #51

Can anyone explain the graphical effects that appears here in the white lines https://i.imgur.com/sRCLAsn.png https://i.imgur.com/81Jf56H.png ? (To reproduce, use a really big stable mass (either enter it by hand or use the OMFG button and click several time at the same position without moving your mouse) and launch at fast speed a tiny particle in an approximately tangent direction of a circle centered on the big ma…

That's a Moiré pattern and is an interaction of the resolution of your display and the proximity of the lines.

http://en.wikipedia.org/wiki/Moir%C3%A9_pattern

Re: Gravity Simulator

#53
post #52
post #51

Can anyone explain the graphical effects that appears here in the white lines https://i.imgur.com/sRCLAsn.png https://i.imgur.com/81Jf56H.png ? (To reproduce, use a really big stable mass (either enter it by hand or use the OMFG button and click several time at the same position without moving your mouse) and launch at fast speed a tiny particle in an approximately tangent direction of a circle centered on the big ma…

That's a Moiré pattern and is an interaction of the resolution of your display and the proximity of the lines. http://en.wikipedia.org/wiki/Moir%C3%A9_pattern

That was quick! Thanks!

I didn't know that Moiré pattern could appear on a screen "without" a second grid (or rather, I didn't realize that the pixels of my display could serve as the second grid, which is kind of obvious now that you said it).

New screenshots: https://imgur.com/a/7W9FI :)

Re: Gravity Simulator

#55
This is nice, but please rename the OMFG button. As someone who works in K-12, it would be a shame if a program like this is rejected because of a button.

Re: Gravity Simulator

#56
post #10

Earlier quoted context omitted.

Isn't that a normal orbit around a common centre of mass? As the objects have a similar size the centre of mass appears to wobble as it moves along. In the frame of the centre of mass, the objects would just go round in standard orbits.

Yeah That's the thing with those kind of simulators (or, actually, with reality), your reference has no relation to the center of mass of the system. Of course, if you "were there" the reference would be the center of mass, like the reference of the solar system is "The Sun" (or a point inside it)

The center of mass of the solar system isn't always within the Sun.

https://en.wikipedia.org/wiki/Barycentric_coordinates_(astro...

Re: Gravity Simulator

#57

Very cool! I was able to get 2 masses to oscillate around each other in a funny way[1]. Seems they keep going like that forever. What is this kind of equilibrium called? [1] http://imgur.com/FQYpo9V

Once you change references frames to the center of mass, two bodies that are gravitationally bound are always following ellipses. It looks like this in the case where they have equal mass:

https://en.wikipedia.org/wiki/Barycentric_coordinates_(astro...

Likewise, two bodies that are not bound will follow hyperbolas in the center of mass frame.

Re: Gravity Simulator

#59

Earlier quoted context omitted.

Yeah That's the thing with those kind of simulators (or, actually, with reality), your reference has no relation to the center of mass of the system. Of course, if you "were there" the reference would be the center of mass, like the reference of the solar system is "The Sun" (or a point inside it)

The center of mass of the solar system isn't always within the Sun. https://en.wikipedia.org/wiki/Barycentric_coordinates_(astro...

[deleted]

Re: Gravity Simulator

#60

I did something similar, but with combat - ships, lasers and missiles. There are a couple of variations, and some tweaks like the ships accelerating perpendicular to the planets so they don't crash land. http://codepen.io/simonswain/full/ftEjD/ http://codepen.io/simonswain/full/CeHmh/

That was great. COngrats!
Post reply on HN