5 ms·
Gravity simulator [flash] - try "Generate proto disk"
- 8ren 16y agoprotip: it goes faster if you move your mouse cursor out of the window.
- hernan7 16y agoPaging Dr Velikovsky...
- jrmxrf 16y agoI can spend all day clicking and watching. Gravity (thou art a heartless bitch)
- wlievens 16y agoReminds me of Osmos. Neat game for the iOS.
- borism 16y agodude, it's cross-platform http://en.wikipedia.org/wiki/Osmos http://en.wikipedia.org/wiki/Osmos
- wlievens 16y agodude, I know. I played the demo on my PC a year ago. I did only buy it for my iPod Touch though. It fits the touch platform really well. I played through every single level except the last arcade level which I can't seem to beat. Damn gravity!
- brown9-2 16y agoAvailable on Steam for Mac and Windows for $9.99: http://store.steampowered.com/app/29180/ http://store.steampowered.com/app/29180/ I picked up Osmos during Steam's xmas sale, the game is a lot of fun and really original.
- maushu 16y agoIs that a solar system I see there? It can also be a galaxy if each dot is a solar system. Makes me wonder if the galaxies are actually orbiting around something and that something is orbiting around something and so on. Turtles all the way down.
- carbocation 16y agoI was under the impression that whether or not the universe had nonzero angular momentum was still open, in which case, yeah, could be.
- umibozu 16y agoYou're onto something... http://en.wikipedia.org/wiki/Supermassive_black_hole#Supermassive_black_hole_hypothesis http://en.wikipedia.org/wiki/Supermassive_black_hole#Superma...
- revjx 16y agoInteresting diversion for a few minutes. I wish there was a website that made the maths for all this kind of thing accessible to idiots who don't have any formal maths education (like me). I've bought a few books, but even those seem to skip a stage or two.
- borism 16y agoWikipedia.org?
- cheald 16y agoThe math is actually really easy. Every two objects exert a force on each other of (mass 1 * mass 2) / (distance ^ 2). Pseudocode to step gravity in a simulation would be something like: foreach(object as o1) { foreach(object as o2) { if(o1 != o2) { force = (o1.mass * o2.mass) / (o1.pos - o2.pos).length o1.vector *= unit_vector_from_o1_to_o2 * force } } } Obviously this is O(n^2), which is why it's so slow when you have a lot of objects in the system, but it's pretty straightforward.
- _corbett 16y agothere are various algorithms to reduce the complexity via physically motivated approximations, see http://www.cs.cmu.edu/~scandal/alg/nbody.html http://www.cs.cmu.edu/~scandal/alg/nbody.html for an older but accessible introduction
- Simucal 16y agoOnce you get the basic Euler setup working it is worth it to try out a more accurate integration method. Anytime someone posts a simulation using Euler Integration someone usually links to the following[1]. It describes why Euler integration isn't good enough (with the famous line, "If you are use Euler then you are a bloody idiot"). It then proceeds to show how to implement RK4 or Runge Kutta order 4. This method will evaluate the derivative at four points in between the previous and current timestep to detect the curvature of an objects velocity. It will then take a weighted average to get the best approximation of the derivative for that timestep. This accounts for acceleration in between timesteps rather than assuming a constant velocity between them. [1] http://gafferongames.com/game-physics/integration-basics/ http://gafferongames.com/game-physics/integration-basics/
- phreeza 16y agoTrying to put something on a lagrange point of a 3 body system. No luck yet though.
- sgt 16y agoI think there's something wrong with it. Why do I get something of mass '1' to affect something with a mass of '1000000000' to such a large degree?
- fhars 16y agoThe simulation is quite bad numerically. If I start with a proto disk and then put an non-moving OMFG particle immediately to the left of it, the whole system that is initially at rest will end a with a considerable momentum to the left, even though no or almost no particles carry any momentum to the right. That is not only not to physical scale, generating momentum out of nothing is completely unphysical.
- grogers 16y agoIt says it uses Euler integration, what do you expect? At least the really bad interactions are mostly handled by absorbing the planets into one another, even though not all of them are.
- 8ren 16y agoNice observation. The inaccuracy is greatest when masses are near, so absorbing close masses limits how near they can get. When I wrote one of these simulators, I had masses zinging off everywhere when they "collided". Question: does this inaccuracy systemically affect the development of a "solar system" from a "proto disk"? I think, by increasing randomness, it would actually tend to work against it somewhat. Also, the odd effect of the proto disk expanding after the sun forms is caused (I think) by masses falling into the sun, and thus further away from the rim of the disk. This greater distances reduces the gravitational force on the rim, and so their velocity ("centrifical" force) can carry them away.
- deleted 16y ago[deleted]
- fhars 16y agoNo, momentum is conserved, that is one of the fundamental laws of physics, right up there with the conservation of energy. In the beginning, the OMFG particle is at rest, and the protodisk particles orbit symmetrically around the center of the protodisk, for a sum total momentum of zero.
- prawn 16y agoThe smaller items whipping around a larger body remind me of the footage you see on docos about the discovery of Sgr A* in our galaxy. It's mesmerising.
- hook 16y agoProbably a stupid question, but does this take into account the speed of light?
- pavel_lishin 16y agoHow do you mean?
- hook 16y agoThe force of gravity is not instantaneous. It "travels" at the speed of light. The Earth is not attracted to where the Sun is "now", it is attracted to where the Sun was approx. 8 minutes ago (the length of time it takes for light to travel from the Sun to the Earth), and vice versa.
- mchouza 16y agoThe Earth is not attracted to where the Sun is "now", it is attracted to where the Sun was approx. 8 minutes ago That's not entirely true as there are higher order effects in GR canceling this lag "to second order". http://math.ucr.edu/home/baez/physics/Relativity/GR/grav_speed.html http://math.ucr.edu/home/baez/physics/Relativity/GR/grav_spe...
- deleted 16y ago[deleted]
- teamonkey 16y agoNo, it doesn't take special relativity or general relativity into account. It's purely Newtonian physics.
- jewbacca 16y agoDear god, there was a solar system simulation on the macs in my middle-school library (c. 1998) that I sunk absolutely inordinate, ridiculous amounts of time into. I think it had a 10-body limit and may have been much older (was definitely monochrome, and possibly used lines of varying density for shading). I can't remember what it was called and I haven't been able to find any information about it. It may be my favourite single piece of software ever and I am certain it had some nontrivial effect on the course of my life[0]. Can anybody help me out? [0] Including nurturing several destructive habits and attitudes, such as on the acceptability of spending grade-school lunch hour on the computer every day.