Created
February 16, 2019 18:45
-
-
Save bmsleight/e1fb0882b519afdb5ee86e39ade51cab to your computer and use it in GitHub Desktop.
Gödel, Escher, Bach.scad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fn=100; | |
words("ILOVEYOU", "OPENSCAD"); | |
module single_letter(tx,ty, ifont, size) | |
{ | |
scale([size/10, size/10,size/10]) | |
{ | |
intersection() { | |
translate([0,10,0]) rotate([90,0,0]) linear_extrude(height =10) text(tx, font = ifont); | |
translate([0,0,0]) rotate([90,0,90]) linear_extrude(height =10) text(ty, font = ifont); | |
} | |
} | |
} | |
module words(wordx, wordy, ifont="Ubuntu Mono:style=Bold", size=20, space_relative=0.75) | |
{ | |
for(i=[0:(len(wordx)-1)]) | |
{ | |
translate([i*size*space_relative,i*size*space_relative,0]) single_letter(tx=wordx[i],ty=wordy[i], ifont=ifont, size=size); | |
} | |
hull() | |
{ | |
translate([space_relative*size/2, space_relative*size/2, -1]) cylinder(h=1, d=size); | |
translate([(len(wordx)-1)*size*space_relative,(len(wordx)-1)*size*space_relative,0]) translate([space_relative*size/2, space_relative*size/2, -1]) cylinder(h=1, d=size); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment