logoalt Hacker News

fsflyer • yesterday at 8:27 PM • 0 replies • view on HN

This brings back memories. In the very early 90s I took a graduate level graphics class and one assignment was to write ray tracer. The professor allowed any programming language in the class, so I used a language that was suited to the assignment. The results had to be printed out to turn in, and color printers were rare, so the assignment was in grey scale.

The postscript image operator in Postscript takes a procedure to return data and it was simple to encode the scene in that procedure. The Postscript image operator scaled the image data between the 500 pixels that image was required to be and the 300 dpi printer resolution and did the grey scale mapping.

The postscript program fit on two pages with comments, many classmates had C or Pascal programs over 20 pages.

The 12 MHz 68000 in the LaserWriter was faster than the 8 MHz in the early Macintoshes or the 4.77 MHz 8086 in the PC clones, so it actually ran faster than many of the other student's ray tracers.