/** This makes a Lord of the Rings ring for 3-D printing. */ res = 254/inch r = 2 inch h = r/2 rx = .2 r ry = rx rz = .4 r // Get this file from: // https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/One_Ring_inscription.svg/1024px-One_Ring_inscription.svg.png // or a different resolution from // https://commons.wikimedia.org/wiki/File:One_Ring_inscription.svg img = new image["file:One_Ring_1024x288.png"] v = callJava["frink.graphics.VoxelArray", "makeSupertoroid", [r res, rx res, ry res, rz res, 1, 1]] // 2-pixel cube tool for testing pixelTool = newJava["frink.graphics.VoxelArray", [0,2,0,2,0,2,true]] emboss = v.cylindricalEmboss[img, 0,0,0, 0 deg, 360 deg, 2 rz res, -.0 cm res, 2 mm res, pixelTool, 0, 0, 0] v.remove[emboss] v.projectX[undef].show["X"] v.projectY[undef].show["Y"] v.projectZ[undef].show["Z"] filename = "OneRingEmboss.obj" print["Writing $filename..."] w = new Writer[filename] w.println[v.toObjFormat["v", 1/(res mm)]] w.close[] println["done."]