We have our rectangular flat lithophanes for putting in the window.

Now we’re going to bend the lithophane surface so that we can produce curved ones including bending it 360 degrees into a cylinder for panoramic photos.

We can then produce single panoramic cylinders for 360 degree images or put a series of lithophanes in a circle to produce a cylindrical photo album.

It doesn’t take much imagination to see how curved lithophanes can be incorporated into lamps, rotating displays, light shades, dioramas, printing wheels, embossing tools, etc.

So, how to convert our flat lithophanes into curved ones? Well, it doesn’t take much. We have a series of x,y,z points on the surface of our model, if we push the x and z coordinates off the flat by adding an offset based on a curve that meets our dimensions, we’ll have a curved lithophane.

There are a few things we need to calculate. if, for instance, we want to produce a lithophane that occupies a 30 degree arc, we need to know where the centre of that arc would be and the radius of the arc so that we can calculate the offset to apply to each point on the surface.

So, in the diagram above, (a) is the angle in degrees, (w) is the width of the flat lithophane, to work out where the centre of the arc is, we need (d) – the distance between the lithophane surface and the centre of the arc. we can calculate (d) if we know the radius of the arc (r), we can get these with the following formulas:

var arcRadius = (width/angle) * (180/Math.PI);
var distanceFromFlat = Math.sin(angle * (360/Math.PI)) * arcRadius;

Now that we know these, we can calculate the offset of each pixel in the lithophane using cos and sin just as if calculating the points on a circle:

//circle pseudo function
for (angle=0 to 360) {
x = centerX + radius * sin(angle);
y = centerY + radius * cos(angle);
}

Putting what we have together:

var magnitude = heightData[index] + arcRadius;
x = width/2 + magnitude * Math.sin(rotation);
z = distanceFromFlat + magnitude * Math.cos(rotation);

Adding these lines into the processVectors routine that calculates the vectors from the 2D height map, allows us to create curved lithophanes, all we need to pass in addition to the original parameters is the curve.

we can add a little extra functionality by allowing the curve to be negative as well as positive. This will allow us to produce curved lithophanes with the detail on the inside or the outside.

var arcRadius=(width/curve)*(180/Math.PI);

I’ve added a curve parameter to the UI with values of: Flat, 30,45,90,120,135,180,270 and 360 degrees inner and outer (inner – texture on the inside of the curve, outer – texture on the outside):

**https://3dp.rocks/lithophane**

I hope you find this useful, my daughter has had all sorts of ideas regarding incorporating images into 3D designs, so there will be more to come.

Maybe you can produce a series of photos for a loved one arranged into a cylinder with an LED candle just in time to save having to think of an alternative by February 14th? Or maybe make a roller for lino style printing, there are so many cylindrical things you can make better with a little texture.

I suppose I’d better finish off lithophanes with domes & spheres next time – until then, here’s a quick project:

Draw a pattern on a strip:

Take a picture and crop the part of the image you want to use:

Create an LED tea light holder: