Follow

Hey,

Musical Gravity Simulation, new release in stereo.

zdjbfxy.cluster028.hosting.ovh

Added Black Hole level and sound quality enhancement.

@homeomnis I played with this a bit today. As far as I can tell, there are three levels:
Spheres orbiting a white sphere
Disks orbiting a black sphere
Hemispheres orbiting a coloured sphere

Each appears to have slightly different collision mechanics, but the only one I really understand is the first level. More info would be welcome.

A couple questions for you:
What is the camera fixed to? It doesn't appear to be either the barycentre or the largest sphere - the main star wobbles relative to the view, but there is a discontinuity when you build up a star that overtakes the main one in size.
Is it possible to adjust the initial conditions of the planets placed by clicking? They appear to have zero velocity in the x and y directions, and a small velocity coming out of the screen.

@khird thank you for your interest.

Three levels indeed. The second one corresponds to the star having collapsed into a blackhole. These orbiting discs are a free interpretation of relativistic effects the blackhole might have on space around it.

First and second level are newtonian gravitation simulation : every bodies feels every other bodies influence. In the third level, hemispheres are only influenced by the central star and not by each other (for computation purposes, as they wanted the player to be able to add lots of them).

The camera follows the biggest star, so there should be a discontinuity indeed if one star gets bigger than the former bigger one (nice observation, never tried this yet, thanks for the feedback). It follows it smoothly so that you can still see the star moving from the gravitational influence of orbiting planets.

No there is no way for the user to adjust the orbits of the added planets. X and Y velocity is pointing toward the star, and Z velocity is computed so that the planet apogea is close to the star (So that you'll ear its sound). This is done so that the further you are from the star when you click, the longer would be the period of the repeating sound of the planet orbiting. I am working on another computation for initial velocities but do not plan to let the user modify it in this little game, I will maybe do so in a more simulation oriented release.

But maybe you didn't have any sounds if you tried it with Google Chrome ? It should works fine with Firefox, no optimisation in any other browser yet.

Good evening

@homeomnis I've since played with it a bit more, mainly on the first level as there seems to be much more to do there. I use Pale Moon, a Firefox derivative, and the sound works but occasionally crackles.

It might be nice to offer a right-click that places the planet on an orbit with the same perihelion and apihelion as the left click, but oriented so it lies in the plane of the screen. I've been able to achieve this a couple times by placing two that orbit at right angles and getting them to interact so one is flung in an oblique direction, but it's difficult to do so with any precision. Having all three dimensions available opens up more possibilities to explore the physics.

I believe I've noticed one bug. Orbital radius and planetary surface radius seem to get out of sync, so under some conditions the smaller body appears to "pop through" the larger body. This most frequently occurs in binary star systems or when a planet has a moon. I *think* what might be happening is that the planet is drawn larger as it approaches the screen, but perspective isn't accounted for when plotting the coordinates of any moons orbiting it, so the apparent orbital radius stays fixed.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.