crude lithophane with OpenSCAD

small lithophane made from photographic portrait of Muhammad Ali in 1967. World Journal Tribune photo by Ira Rosenberg (source)

After reading I didn’t know lithophanes were so simple. They were hiding in Cura all along. : 3Dprinting, I thought I’d give OpenSCAD a shot at generating a lithophane image. It did not badly at all, considering this was my first try.

This isn’t a fast process and generates huge STL files, but it’s fairly simple. Here’s how I did it:

  1. Download your image. I used this 479 × 599 pixel preview.
  2. Convert your image to PNG, preferably grey scale
  3. Run it through the OpenSCAD script below, changing the parameters according to the instructions
  4. Render it in OpenSCAD (slow)
  5. 3D print the resultant STL in 0.05 mm layers (very slow)
//  somewhat rough OpenSCAD lithophane - scruss, 2019-10
 infile  = "479px-Muhammad_Ali_NYWTS.png";    // input image, PNG greyscale best
 x_px    = 479;  // input image width,  pixels
 y_px    = 599;  // input image height, pixels
 z_min   = 0.8;  // minimum output thickness, mm
 z_max   = 3;    // maximum output thickness, mm
 y_size  = 50;   // output image height, mm
 // don't need to modify anything below here
 translate([0, 0, z_max])scale([y_size / y_px, y_size / y_px, (z_max - z_min)/100])surface(file = infile, invert = true);
 cube([x_px * y_size / y_px, y_size, z_min]);

I used Makerbot warm white PLA. It looks decent at viewing distance, but close up it’s a bit stringy.

closeup of lithophane eye

There are better packages, but OpenSCAD does this better than I expected.

Lovely automata: bbcbasicbot

bbcbasicbot rendering of my one-liner

BBC BASIC bot [beta2] on Twitter is lovely. You tweet a BBC BASIC program to it and it replies with an animation rendering of what your program would look like on a BBC Micro.

I sent it this:


which readers might recognize as 10 PRINT, the endless random maze one-liner for the C64. This program even inspired its own book – also called 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 – about simple generative art.

You can run it in your browser thanks to the amazing JSBeeb.

Weird thrift-store find: homebrew CD player

I killed some time this lunchtime in a thrift store. I was half-looking for a case for a kit computer, but wasn’t expecting much to turn up. But I found this:

There really are no identifying marks on this. No idea how it got to be in Canada.