torusTest.frink

Download or view torusTest.frink in plain text format


/** This tests Frink's rendering of toroids and supertoroid family for 3-D
    printing.
*/


r = 254/in
v = callJava["frink.graphics.VoxelArray", "makeSupertoroid", [1 in r, .2 in r, .2 in r, .4 in r, .5, 1]]

v.projectX[undef].show["X"]
v.projectY[undef].show["Y"]
v.projectZ[undef].show["Z"]

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


Download or view torusTest.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 20218 days, 0 hours, 1 minutes ago.