21: v = callJava["frink.graphics.VoxelArray", "extrudeZ", [img, round[depth r]]]
91: // Calculate the voxel resolution that we printed the original at
124: v = callJava["frink.graphics.VoxelArray", "strokeZ", [wallPoly, floorThickness r , (wallHeight+floorThickness) r, wallThickness/2 r, true]]
127: f = callJava["frink.graphics.VoxelArray", "extrudeZ", [floorPoly, 0, floorThickness r]]
131: f = callJava["frink.graphics.VoxelArray", "extrudeZ", [img, round[floorThickness r], round[(floorThickness + emboss) r]]]
136: lw = callJava["frink.graphics.VoxelArray", "strokeZ", [lidWall, 0, lidWallHeight r, wallThickness/2 r, true]]
139: top = callJava["frink.graphics.VoxelArray", "extrudeZ", [lid, round[lidWallHeight r], round[(lidWallHeight + lidThickness) r]]]
18: v = callJava["frink.graphics.VoxelArray", "extrudeZ", [img, round[depth r]]]
88: // Calculate the voxel resolution that we printed the original at
121: v = callJava["frink.graphics.VoxelArray", "strokeZ", [wallPoly, floorThickness r , (wallHeight+floorThickness) r, wallThickness/2 r, true]]
124: f = callJava["frink.graphics.VoxelArray", "extrudeZ", [floorPoly, 0, floorThickness r]]
128: f = callJava["frink.graphics.VoxelArray", "extrudeZ", [img, round[floorThickness r], round[(floorThickness + emboss) r]]]
133: lw = callJava["frink.graphics.VoxelArray", "strokeZ", [lidWall, 0, lidWallHeight r, wallThickness/2 r, true]]
136: top = callJava["frink.graphics.VoxelArray", "extrudeZ", [lid, round[lidWallHeight r], round[(lidWallHeight + lidThickness) r]]]
5: c1 = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, 0, 0, 0, 100, 787/2]]
8: cin = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, 10, 0, 0, 100, 770/2]]
12: ch = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, 0, 0, 0, 100, 50]]
16: c2 = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, 0, 0, 0, 100, 40]]
4: // The resolution of the object in voxels/length.
16: c1 = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, 0, 0, 0, height r, outerDiam/2 r]]
19: cin = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, topThickness r, 0, 0, height r, innerDiam/2 r]]
28: v = callJava["frink.graphics.VoxelArray", "extrudeZTapered", [polygon, 0 in res, length res, outerRadius/outerRadius, tipRadius/outerRadius]]
9: c1 = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, 0, 0, 0, h r, outerDiam r]]
12: cin = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, 10, 0, 0, h r, innerDiam r]]
3: rotation of VoxelArrays, tapered cylinders, rounded cubes,
85: /** Extrude text and create a VoxelArray of it. */
95: return callJava["frink.graphics.VoxelArray", "extrudeZ", [img, depth]]
101: return callJava["frink.graphics.VoxelArray", "makeRoundedCube", [xmin, xmax, ymin, ymax, zmin, zmax, radius]]
107: return callJava["frink.graphics.VoxelArray", "makeCylinder", [x1, y1, z1,
115: return callJava["frink.graphics.VoxelArray", "makeTaperedCylinder",
38: return callJava["frink.graphics.VoxelArray", "makeCylinder", [x1, y1, z1,
46: return callJava["frink.graphics.VoxelArray", "makeTaperedCylinder",
5: // The resolution of the object in voxels/length.
22: holder = callJava["frink.graphics.VoxelArray", "construct", [-holderWidth/2 r, holderWidth/2 r, -(outerDiam/2 + holderDepth) r, 0, (height-holderHeight) r, (height) r, true]]
26: channel = callJava["frink.graphics.VoxelArray", "construct", [-holderWidth/2 r, holderWidth/2 r, -(outerDiam/2 + 3.1 mm) r, (outerDiam/2) r, (height-holderHeight) r, (height-2 mm) r, true]]
31: c1 = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, 0, 0, 0, height r, outerDiam/2 r]]
35: cin = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, topThickness r, 0, 0, height r, innerDiam/2 r]]
2: /** This tests extruding an image or text to a 3-D VoxelArray for 3-D
11: v = callJava["frink.graphics.VoxelArray", "extrudeZ", [img,20]]
16: // This sets the resolution of the final object in voxels.
23: v = newJava["frink.graphics.VoxelArray", [w1,h1,h1,true]]
18: v = newJava["frink.graphics.VoxelArray", [w1,h1,h1,true]]
25: voxels in the .obj file larger.
46: // Change the doublings to vary the number of voxels. This is the number
49: // Be warned that increasing the doublings by 1 makes 8 times as many voxels!
51: r = 2^doublings // Number of voxels on each axis
93: v = callJava["frink.graphics.VoxelArray", "construct", [xmin sx, xmax sx, ymin sy, ymax sy, zmin sz, zmax sz, false]]
8: v = callJava["frink.graphics.VoxelArray", "makeSphere", [s]]
41: /** This draws a "line" (a capped cylinder) into the specified VoxelArray */
15: // The resolution of the object in voxels/length.
44: /** Extrude text and create a VoxelArray of it. */
52: return callJava["frink.graphics.VoxelArray", "extrudeZ", [img, depth]]
59: c1 = callJava["frink.graphics.VoxelArray", "makeTaperedCylinder", [0, 0, 0, 0, 0, chamferHeight, radius-chamferHeight, radius]]
62: c2 = callJava["frink.graphics.VoxelArray", "makeCylinder", [0, 0, chamferHeight, 0, 0, height-chamferHeight, radius]]
65: c3 = callJava["frink.graphics.VoxelArray", "makeTaperedCylinder", [0, 0, height-chamferHeight, 0, 0, height, radius, radius-chamferHeight]]
5: r = 254/in // Voxel resolution
38: //tool = callJava["frink.graphics.VoxelArray", "makeTaperedCylinder", [0,0,0, 0,0,wallHeight r, br r, tr r]]
39: //v = callJava["frink.graphics.VoxelArray", "strokeZ", [poly, tool, 0,0,wallHeight/2 r, true]]
42: v = callJava["frink.graphics.VoxelArray", "strokeZTapered", [poly, 0, wallHeight r, br r, tr r, true]]
4: v = callJava["frink.graphics.VoxelArray", "makeRoundedCube", [20, 150, -20, 140, -30, 110, 50]]
19: v = callJava["frink.graphics.VoxelArray", "construct" , [0 mm r, 10 mm r, -armDepth r, armDepth r, 0 mm r, height r, true]]
22: a1 = callJava["frink.graphics.VoxelArray", "makeRoundedCube", [9 mm r, (9 mm + armLength) r, gap/2 r, armDepth r, 0 mm r, height r, 1 mm r]]
23: a2 = callJava["frink.graphics.VoxelArray", "makeRoundedCube", [9 mm r, (9 mm + armLength) r, -armDepth r, -gap/2 r, 0 mm r, height r, 1 mm r]]
28: r1out = callJava["frink.graphics.VoxelArray", "makeCylinder", [rcx r, rcy r, 0 mm r, rcx r, rcy r, height r, ((1/2 ring1Diam) + ringThickness) r]]
29: r1in = callJava["frink.graphics.VoxelArray", "makeCylinder", [rcx r, rcy r, 0 mm r, rcx r, rcy r, height r, (1/2 ring1Diam) r]]
36: r2out = callJava["frink.graphics.VoxelArray", "makeCylinder", [rcx r, rcy r, 0 mm r, rcx r, rcy r, height r, ((1/2 ring2Diam) + ringThickness) r]]
37: r2in = callJava["frink.graphics.VoxelArray", "makeCylinder", [rcx r, rcy r, 0 mm r, rcx r, rcy r, height r, (1/2 ring2Diam) r]]
63: /** Extrude text along a plane and create a VoxelArray of it. */
70: return callJava["frink.graphics.VoxelArray", "extrudeZ", [img, round[depth]]]
20: v = callJava["frink.graphics.VoxelArray", "construct" , [0 mm r, 10 mm r, -armDepth r, armDepth r, 0 mm r, height r, true]]
23: a1 = callJava["frink.graphics.VoxelArray", "makeRoundedCube", [9 mm r, (9 mm + armLength) r, gap/2 r, armDepth r, 0 mm r, height r, 1 mm r]]
24: a2 = callJava["frink.graphics.VoxelArray", "makeRoundedCube", [9 mm r, (9 mm + armLength) r, -armDepth r, -gap/2 r, 0 mm r, height r, 1 mm r]]
27: r1 = callJava["frink.graphics.VoxelArray", "makeSupertoroid", [(1/2 ring1Diam + 1/2 ringThickness) r, 1/2 ringThickness r, 1/2 ringThickness r, 1.001 height/2 r, .5, 1]]
34: r2 = callJava["frink.graphics.VoxelArray", "makeSupertoroid", [(1/2 ring2Diam + 1/2 ringThickness) r, 1/2 ringThickness r, 1/2 ringThickness r, 1.001 height/2 r, .5, 1]]
62: /** Extrude text along a plane and create a VoxelArray of it. */
69: return callJava["frink.graphics.VoxelArray", "extrudeZ", [img, round[depth]]]
19: // numbers to feed to the dimensionless integer VoxelArray class
22: v = callJava["frink.graphics.VoxelArray", "makeCylinder", [0,0,z0 r, 0,0,z1 r, stopDiam/2 r]]
25: v = v.union[callJava["frink.graphics.VoxelArray", "makeCylinder", [0,0,z0 r, 0,0,2 in r, cylDiam/2 r]]]
17: v = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], true]]
20: c1 = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], false]]
25: c2 = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], false]]
17: v = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], true]]
20: c1 = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], false]]
25: c2 = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], false]]
17: v = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], true]]
20: c1 = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], false]]
25: c2 = newJava["frink.graphics.VoxelArray", [round[-width res/2], round[width res], round[-depth res/2], round[depth res], 0, round[height res], false]]
18: outer = callJava["frink.graphics.VoxelArray", "construct", [-thickness r, (width+thickness) r, -thickness r, (depth+thickness) r, 0 mm r, height r, true]]
21: inner = callJava["frink.graphics.VoxelArray", "construct", [0 mm r, width r, 0 mm r, depth r, 0 mm r, height r, true]]
24: outer = callJava["frink.graphics.VoxelArray", "makeRoundedCube", [-thickness r, (width+thickness) r, -thickness r, (depth+thickness) r, -thickness r, (height+thickness) r, (radius + thickness) r]]
27: inner = callJava["frink.graphics.VoxelArray", "makeRoundedCube", [0 mm r, width r, 0 mm r, depth r, 0 mm r, height r, radius r]]
7: v = callJava["frink.graphics.VoxelArray", "makeSupertoroid", [1 in r, .2 in r, .2 in r, .4 in r, .5, 1]]
// This is a simple test to make a VoxelArray and output it as a Wavefront
v = newJava["frink.graphics.VoxelArray", [9,9,9,true]]
v = callJava["frink.graphics.VoxelArray", "extrudeZ", [polygon, round[0 in res], round[1 in res]]]
filename = "VoxelPolygonTest.obj"
v = callJava["frink.graphics.VoxelArray", "makeSphere", [1 in res]]
v = v.union[callJava["frink.graphics.VoxelArray", "extrudeTapered", [polygon, x res in, y res in, z res in, 2x res in, 2y res in, 2z res in, 0, 0, 0, 1, 30 deg]]]
filename = "VoxelRotatedPolygonTest.obj"
/** This program tests the rotation of a VoxelArray. */
v = callJava["frink.graphics.VoxelArray", "construct", [-10, 10, -20, 20, -30, 30, true]]
filename = "VoxelRotateTest.obj"
v = callJava["frink.graphics.VoxelArray", "strokeZ", [polygon, round[0 in res], round[1 in res], 1.5 mm res, true]]
filename = "VoxelStrokePolygonTest.obj"
v = callJava["frink.graphics.VoxelArray", "extrudeZTapered", [polygon, 0 in res, 1 in res, 1, .5]]
filename = "VoxelTaperedPolygonTest.obj"
v = callJava["frink.graphics.VoxelArray", "extrudeZTapered", [polygon, 0 in res, 1 in res, 1, 0]]
filename = "VoxelXYZRotateTest.obj"
Alan Eliasen was born 18868 days, 2 hours, 11 minutes ago.
Back to Frink Sample Programs