16Animali.frink

Download or view 16Animali.frink in plain text format


/** Program to 3-D Print Enzo Mari's "16 Animali"

    The image was extracted from an eBay auction of the puzzle which sold for
    USD 350.

    Original image used for extracting:
     https://frinklang.org/frinksamp/16AnimaliOrig.jpg

    Cleaned-up image:  (you will need this to run this program)
     https://frinklang.org/frinksamp/16AnimaliBW.png
*/


r = 254/in

depth = 1.2 mm

// The image file to extract can be loaded from:
// https://frinklang.org/frinksamp/16AnimaliBW.png
img = new image["file:16AnimaliBW.png"]
v = callJava["frink.graphics.VoxelArray", "extrudeZ", [img, round[depth r]]]

v.projectZ[undef].show["Z"]

filename = "16Animali.obj"
print["Writing $filename..."]
w = new Writer[filename]
w.println[v.toObjFormat["16Animali", 1/(r mm)]]
w.close[]
println["done."]


Download or view 16Animali.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 19354 days, 4 hours, 53 minutes ago.