I would have done this in either Processing, or if it was connecting to something running Plan9 I’d do raw draw commands.