Welcome to the repository for as the body falls, a node applicaton for your terminal that generates images based on falling planets. It supports custom palettes, planets, and parameters, and there's endless possibilities and permutations!
So how does this all work? Basically, you get to choose the number and position of "gravity points" on your image that have mass. Then for each pixel, it drops a little planet that falls toward the points. The point that it falls into determines the color of the pixel!
Clone this repository in your terminal with git clone or download it from this page and unzip it. Next, install Node.js and run npm i from that folder. This will set up the correct packages you need automatically! Now you can create images in your terminal with node ..
| Parameter | Significance |
|---|---|
| Width | The width of the image |
| Height | The width of the image |
| Gravity | The precision of the image, lower number = more precise |
| Drag | The simplicity of the image, lower number = more complex |
| Radius | Collision radius of each gravity point, lower number = slower calculation, more precise |
| Number of Points | Number of gravity points in the image, higher number = more colors, faster, more chaotic |
| Manual Point Positions? | Choose whether to have the points randomly placed or choose their placement manually |
| Show Points? | Choose whether to render the points in the image or have them invisible. Render size affected by Radius |
| Palette | Choose the palette to render the image in. Depending on Number of Points, some palettes may not have enough colors. Also see Custom Palettes! |
| Random Colors? | Choose whether to shuffle the colors in the palette randomly or keep them in order. Only appears if Manual Point Positions is Yes |
| Darken by Time? | Choose whether to have the image darken more when the planets fall into a point more quickly. Points themselves are the most modified parts of the image. Use a palette with similar brightnesses in colors if you want to make sense of it, otherwise just acts as a cool bloom/depth effect |
| Give Up Timer | Number of physics steps the renderer takes before it calls it a day and marks a pixel with the failure color, higher number = slower calculation, possibly more complete images |
The included palettes.txt has lots of palettes for you to try, but feel free to edit it and add your own! Palette names can have spaces and as many colors as you want. The first color is the failure color and might not show up on some high-drag images.



