PS:Clock

Drawing a clock in PostScript is straightforward. You rotate the context to draw the minute marks. Then you get the current time in milliseconds with realtime. On a postscript device, this may be an arbitrary value, but in our interpreter it is the current time. You rotate the context to draw the 3 hands. For the second hand which stops every minute, you mod the value to get it in the 0-60 range, multiply it with 60/59 and then cap the value at 59. The clock drawing takes 3-4 milliseconds on a macbook, which is way to fast and CPU-consuming. So we implemented a wait operator to get a frame rate of about 12 frames per second.

Gallery