{"id":15747,"date":"2019-10-27T20:36:47","date_gmt":"2019-10-28T00:36:47","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=15747"},"modified":"2019-10-27T20:36:53","modified_gmt":"2019-10-28T00:36:53","slug":"crude-lithophane-with-openscad","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2019\/10\/27\/crude-lithophane-with-openscad\/","title":{"rendered":"crude lithophane with OpenSCAD"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"984\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho1.jpg\" alt=\"\" class=\"wp-image-15748\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho1.jpg 800w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho1-130x160.jpg 130w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho1-260x320.jpg 260w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho1-768x945.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>small lithophane made from photographic portrait of <strong><a href=\"https:\/\/commons.wikimedia.org\/wiki\/Category:Muhammad_Ali\">Muhammad Ali<\/a><\/strong> in 1967. World Journal Tribune photo by Ira Rosenberg (<a href=\"https:\/\/commons.wikimedia.org\/wiki\/File:Muhammad_Ali_NYWTS.jpg#\/media\/File:Muhammad_Ali_NYWTS.jpg\">source<\/a>)<\/figcaption><\/figure>\n\n\n\n<p>After reading <a href=\"https:\/\/old.reddit.com\/r\/3Dprinting\/comments\/dkj8r3\/i_didnt_know_lithophanes_were_so_simple_they_were\/\">I didn\u00e2\u20ac\u2122t know lithophanes were so simple. They were hiding in Cura all along. : 3Dprinting<\/a>, I thought I&#8217;d give OpenSCAD a shot at generating a lithophane image. It did not badly at all, considering this was my first try.<\/p>\n\n\n\n<p>This isn&#8217;t a fast process and generates <strong>huge<\/strong> STL files, but it&#8217;s fairly simple. Here&#8217;s how I did it:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Download your image. I used this  <a href=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/89\/Muhammad_Ali_NYWTS.jpg\/479px-Muhammad_Ali_NYWTS.jpg\">479 \u00c3\u2014 599 pixel<\/a> preview.<\/li><li>Convert your image to PNG, preferably grey scale<\/li><li>Run it through the OpenSCAD script below, changing the parameters according to the instructions<\/li><li>Render it in OpenSCAD (slow)<\/li><li>3D print the resultant STL in 0.05 mm layers (very slow)<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/  somewhat rough OpenSCAD lithophane - scruss, 2019-10\n infile  = \"479px-Muhammad_Ali_NYWTS.png\";    \/\/ input image, PNG greyscale best\n x_px    = 479;  \/\/ input image width,  pixels\n y_px    = 599;  \/\/ input image height, pixels\n z_min   = 0.8;  \/\/ minimum output thickness, mm\n z_max   = 3;    \/\/ maximum output thickness, mm\n y_size  = 50;   \/\/ output image height, mm\n \/\/ don't need to modify anything below here\n translate([0, 0, z_max])scale([y_size \/ y_px, y_size \/ y_px, (z_max - z_min)\/100])surface(file = infile, invert = true);\n cube([x_px * y_size \/ y_px, y_size, z_min]);<\/pre>\n\n\n\n<p>I used Makerbot warm white PLA. It looks decent at viewing distance, but close up it&#8217;s a bit stringy.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"984\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho2.jpg\" alt=\"\" class=\"wp-image-15749\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho2.jpg 800w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho2-130x160.jpg 130w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho2-260x320.jpg 260w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/10\/goat_litho2-768x945.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>closeup of lithophane eye<\/figcaption><\/figure>\n\n\n\n<p>There are better packages, but OpenSCAD does this better than I expected.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After reading I didn\u00e2\u20ac\u2122t know lithophanes were so simple. They were hiding in Cura all along. : 3Dprinting, I thought I&#8217;d give OpenSCAD a shot at generating a lithophane image. It did not badly at all, considering this was my first try. This isn&#8217;t a fast process and generates huge STL files, but it&#8217;s fairly [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2],"tags":[],"class_list":["post-15747","post","type-post","status-publish","format-standard","hentry","category-goatee-stroking-musing-or-something"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-45Z","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/15747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=15747"}],"version-history":[{"count":1,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/15747\/revisions"}],"predecessor-version":[{"id":15750,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/15747\/revisions\/15750"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=15747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=15747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=15747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}