<Angle-brackets/> on the Branch Line

(Model) railway engineering with XML technologies

John Lumley

jωL Research,


As a retirement 'hobby', somewhat removed from the computing milieu, the author has started building a model railway in his garden. Surveying the extant tools for designing such layouts and finding them not quite right, he started building a design tool himself, using the familiar technologies of XSLT3 and SVG executing in a browser, employing Saxon-JS as the processing platform. By adding animations, the tool expanded beyond simple design to in effect become an active model train system. The results of this were demonstrated, with some success, at Markup UK in 2018. This paper describes the design of this tool in some detail, as well as possible developments since that demonstration.

Table of Contents

Overall Design
Layout Topology and Geometry
Representing the topology
Computing the geometry
Drawing pictures
Isometric Views
True 3D models and view rotation
Collision detection, a.k.a. train crashes

Without Saxon-JS this project wouldn't have even been attempted and thanks are due to my colleagues Mike Kay and Debbie Lockett for the excellence of that product. The author is of course extremely grateful for the many votes cast in his direction at last year's MarkupUK DemoJam — without them he wouldn't have had to write this paper.