Paiagram
How to make timetables (for trains).
Years ago I watched a video about how Chinese railways are scheduled and organized. The video talked about a tool named "运行图". I don't have an official English translation for it (and I also couldn't find related materials of North American railway companies), so I'll just call it a "timetable diagram" afterwards. Anyways, as an elementary kid who have some weird obsession with transportation [1], the organization displayed in the video absolutely fascinated me.
The storytelling part is done, let's talk about something else.
1. Timetable Diagrams
A timetable diagram is a diagram that describes the position and time of trains on a one-dimensional railway. First invented in Paris in the 19th century, it has been the primary tool for railway schedule planning.
It looks like this:[2]
Each line represents a train. The actual position of the train is usually not exactly the same as the position shown in the diagram, since trains' speeds varies over the journey. The lines are approximations of the actual positions. Despite that, they still remain a powerful tool to prevent collisions, and optimize track usage.
2. A Rust Plugin
I was messing with Typst since last year. It's a handy tool, specifically for typesetting. However, it has the potential to do more than just typesetting. It has these powerful functions:
place()curve()box()
And these values:
- Values of the
alignmenttype, includingtop,bottom,left,horizon, etc.
These functions and values could build up an elementary drawing library, and that is exactly what I did. I made Paiagram.