InkOrbit in progress
A Python library that draws orbital diagrams in the style of 1960s black-and-white technical reports: technical-pen line weights, stippled night sides, drafting arrowheads and single-stroke lettering.

Why
In old textbooks and NASA reports orbital diagrams were drafted by hand. Though modern astrodynamics as a whole is much, much easier, those old diagrams captured a certain spirit and feeling that can be lost in our computer generated plots. Modern plotting libraries can show the same orbits, but the results look like plots, not drawings. With InkOrbit I wanted to try to bring back some of that spirit but into the digital age. A diagram that still uses real orbital data but looks like an old textbook drawing.
What it does
Each diagram is one call. You give it an orbit, and it returns a finished, labeled figure:
import numpy as np
import inkorbit as ink
gto = ink.Elements(a=24_400, e=0.72, i=np.radians(28.5), argp=np.radians(35), nu=np.radians(125))
ink.diagram("orbit", gto, caption="Figure 3.2-1 Geosynchronous transfer orbit").savefig("gto.png")
ink.diagram("hohmann", 6_678, 42_164) # radii in km
There are ready-made diagrams for a single orbit, several orbits, a Hohmann transfer and a ground track. Each one returns a plate you can keep drawing on with lower-level building blocks: apsides, nodes, angles, vectors and spacecraft. Labels are placed automatically so they avoid lines and each other.
An oblique view shows an orbit from a camera off its plane. The parts behind the globe are dashed.
Printed mode turns the finished figure into a two-color bitmap that looks scanned from an old report, with ink spread, rough edges, grain and a slight skew. It is seeded, so the same figure always prints the same way.
It also works with the Python astrodynamics tools people already use. You can pass a poliastro or hapsira
Orbit, astropy quantities or Skyfield positions straight in. There’s also an interactive viewer: zoom,
pan, drag labels and rotate the camera, then save the view or copy it as code.
How it’s built
Scene ──layout──▶ Drawing ──renderer──▶ image
data units page millimetres matplotlib (for now)
- Lines have roles, not colors. A scene records what each line is (an orbit, a transfer, a
construction line) and a
Styledecides how that role is inked: pen width in mm, dash pattern, stipple density. - Everything becomes plain ink. Layout fits the scene on a page and turns text, arrowheads and fill patterns into just three things: strokes, solid polygons and dots. Lettering uses Hershey single-stroke vector fonts, so text is inked like every other line.
- Backends stay small. A renderer only has to draw those three things. matplotlib is the first backend, and adding another (SVG or Cairo) is a small job.
- Tested against images. The test suite compares every diagram against baseline images, so a change that moves a line shows up straight away.
Status
InkOrbit is in active development. The core diagrams, globes, oblique view, printed mode and interactive viewer all work.
The code is open source (BSD 3-Clause) on GitHub.