planets(1)

πŸ’« planets β€” bestie's guide to yeeting celestial bodies around πŸ’«

okay so real talk, this is planets(1), from the General Commands Manual section, and it's genuinely one of my fave little programs ever. sit down, grab a snack, we're doing gravitational physics πŸ’–


✨ NAME ✨

planets β€” gravitational simulation of planetary bodies πŸͺβœ¨


🌸 DESCRIPTION 🌸

so basically planets is a lil interactive program for playing around with simulations of planetary systems. and the way that it's lowkey a perfect teaching tool for understanding how gravitation works on a planetary level?? obsessed. fr fr. 🧚

the user interface is designed to be simple enough that a fairly young kid can get some joy out of it πŸ’… and there's ALSO a special kid-mode aimed at very young children β€” and no cap, kid mode grabs the focus and converts key banging into lots of random planets. like, chaos mode activated, planets everywhere, iconic. πŸŽ€


πŸŽ€ KEYBINDINGS πŸŽ€

πŸͺ Universe definition

  • a β€” Add Planet
  • j β€” Place random orbital planet
  • r β€” Place random planet
  • u β€” Undo (undoes the last planet insertion)
  • e β€” Reset to empty universe
  • g β€” Go Back (goes back to just after the last planet insertion)
  • Mouse β€” Click on a planet to delete it 🫢

πŸ”₯ Physics

  • b β€” Toggle bounce (experimental β€” yes bestie, experimental, we'll get to that)

🌈 Display control

  • Cursor keys β€” Panning
  • c, Space β€” Move display to center of mass
  • x β€” Initiate center of mass tracking
  • = β€” Zoom in
  • - β€” Zoom out
  • p β€” Toggle Pause
  • o β€” Change all colors randomly (chaos. beautiful chaos.)
  • t β€” Toggle Trace
  • d β€” Double Trace Length
  • h β€” Halve Trace Length
  • Mouse β€” Drag a box around a set of planets to follow the center of mass of those planets

πŸ‘‘ Program control

  • H β€” Display help dialog
  • k β€” Display option dialog
  • Ctrl-Shift-k β€” Toggle kid-mode. Kid mode locks the keyboard and mouse, so the only way to get out is to toggle kid-mode again to get out. 🚨
okay so real talk: kid mode is a trap if you don't remember the escape hatch. it locks your keyboard and mouse, and the ONLY way out is toggling kid-mode again. memorize Ctrl-Shift-k. that's your exit. periodt.
  • l β€” Load Universe. After pressing l, press any other character to load the universe with that name. Universes are stored in ~/.planets/ .
  • s β€” Save Universe. After pressing s, press any other character to save the universe with that name. Universes are saved in ~/.planets/ .
  • q, Esc β€” Quit

πŸ”¬ TECHNICAL DETAILS πŸ”¬

ngl the actual math here is kinda slay. planets uses a fourth-order runge-kutta approximation for the simulation itself. ✨

planet bouncing is achieved by adding a repulsive force to planets at close quarters.

and the way planets is fairly flexible?? you can change the gravitational constant, the time-slice of the simulation, and even the exponent used in the gravitational law. yes bestie, the exponent. go wild. πŸ’…

universes are saved in the ~/.planets directory, and they're simple human readable and editable files β€” so you can literally just open them up and mess with them yourself. no cap. πŸ¦‹


πŸ’€ BUGS πŸ’€

currently bouncing doesn't work very well unless you make the time-slice quite small. 😭

ideally, it would be nice to have a billiard-style bounce system, but it's not clear how to do this accurately in the presence of a strong gravitational field. so like... we're all just living with it for now. πŸ™ˆ


🫢 AUTHOR 🫢

planets was written by Yaron M. Minsky <yminsky@cs.cornell.edu> as a gift for his nephew, Eyal Minsky-Fenick. (a gift!! for his nephew!!! the way that's the sweetest thing ever, I'm literally tearing up πŸ˜­πŸ’–)

this manpage was contributed originally by Martin Pitt <martin@piware.de> for the Debian GNU/Linux system (but may be used by others). 🐧


okay that's the whole thing bestie, you're fully caught up. this page is from April 20, 2003 and it lives under planets(1) β€” go add a planet for me, mwah πŸ’…πŸ’–βœ¨