• Mastodon
  • Discord
  • YouTube
  • RSS



News


Hollow Planets

October 1, 2018

I got a great question from someone who’d been using GSim – let’s call them B.A.

To paraphrase: can you make a ‘hollow’ planet in the simulator, and test out how gravity would work inside it.

This ended up being a more interesting challenge than I realized, so I figure I’d share my response with all of you:

…

Ah, good question – I had to think about that one a bit. The short answer is, yes.

Right now, if you have a single star and put an asteroid inside it… it will get absorbed. *But* if you place a static star, then put a *planet* inside it (while the collisions are turned off), then it won’t get absorbed, and it will move around affected by the gravity of the star.

In that case, though, the star isn’t treated as hollow, but instead as having a constant density. So just like if you drilled a hole all the way through the earth, where you’d fall down, feeling the varying effects of gravity as you did.

I don’t think that’s what you mean by hollow object, though. To create something truly hollow, which would have all its mass on an outer shell, we’ll have to get more creative.

At first I tried making a ring of smaller stars, to act like the outer shell of an object. The code is here:

//Gravity fun at TestTubeGames
_settings(gravity: r^-2);
_addCircle(vt: 0, r: 150, num: 400, col: 1, t: 0, m: 10, lcol: 0, noGrav);

 

Screen Shot 2018-10-01 at 10.39.48 AM

400 small static stars, arranged in a ring

 

If you try that, and throw in a few asteroids, you’ll notice that this doesn’t behave like you’d expect at all. Turns out, we made a flat ring, not a 3D shell, and they behave quite differently.

If you have the full version of the sim (the downloadable one), then you can set the simulation to be calculating in 2 dimensions, using the Physics menu, and that kind of helps — though introduces the issues that come along with calculating physics in different dimensions.

Well…

Then it struck me that a more straightforward(?) way to do this would be to create a star with negative mass… and put that *inside* the star with positive mass. (Negative mass is just a fun theoretical thing you can explore in the sim… but it’s very helpful here). If the two have the same density, then the negative mass and positive mass in any overlapping areas would cancel out to zero. With a slightly lower mass negative star overlapping a positive mass star, then, we can create a hollow object.

Here’s some code to try it out:

//Gravity fun at TestTubeGames
_settings(gravity: r^-2, x: 2.522413, y: 1.124918, zoom: 18.72843);
_add(m: 10000, col: 2, lcol: 3, pic: 0, noGrav, x: 0, y: 0);
_add(m: -9900, col: 16, lcol: 3, pic: 0, noGrav, x: 0, y: 0);

 

That thin yellow shell, if you can see it, is the surface of the hollow star.

That thin yellow shell, if you can see it, is the surface of the hollow star.

 

Make sure collisions are off, then fling some asteroids* in there. You should be good to go.

*due to an issue with the way density is calculated, stick with asteroids for this test for now. Planet behavior inside a hollow object is a bit broken.

-Andy

<< Newer

Older >>



This entry was posted in Gravity Simulator. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Trackbacks are closed, but you can post a comment.


Write your comment

Click here to cancel reply.

Your email is never published nor shared. Required fields are marked *

*
*



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Join the newsletter to stay up-to-date



Categories

  • @Evolving_Art (2)
  • Agent Higgs (29)
  • Bond Breaker (21)
  • Circuit Game (1)
  • Electric Shocktopus (73)
  • Evolution Simulation (4)
  • Friday Fun (6)
  • General News (30)
  • Gravity Simulator (23)
  • Lesson Time! (10)
  • Physics Lessons (1)
  • Quantum Game (4)
  • Science Playground (1)
  • Slide Rule (1)
  • TestTubeGames Explains (1)
  • Uncategorized (4)
  • Velocity Raptor (17)
  • Wednesday Update (35)

Archive

  • July 2024
  • December 2023
  • July 2023
  • May 2023
  • April 2023
  • February 2022
  • November 2020
  • August 2019
  • June 2019
  • April 2019
  • October 2018
  • May 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • June 2016
  • May 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • February 2012
  • January 2012
  • December 2011
Home Blog Games Forums About

.

The Electric Shocktopus Press Kit
Gravity Simulator Privacy Policy
Bond Breaker Merch
Velocity Raptor -
The Fittest 2 Support Free Resources
Black Hole Explorer
Veloc-t in Space
-more-


Email: andy a;>t this-domain

Copyright © TestTubeGames 2011-2023