10 Apr

By exploring the theory, the following shapes arose as a natural G4G13 giveaway: a regular 13-gon prism, a cup with octagonal cross sections whose octagon sides scaled with height as √(1-h³), and a cup with pentagonal cross sections with sides scaling as h3/2.

The largest octagon and pentagon would be sized to have the same area as the 13-gon, which we saw would guarantee that the octagon cup (or “Gengzhi Goblet,” as we’re calling them) would have 3/4 the volume and the pentagon goblet would have 1/4 the volume. So we would scale the 13-gon goblet to have volume equal to that antiquated measure, 1 U.S. cup, or about 236 cubic centimeters.

You can actually do all of the above for any proportion of height of the measuring cups to diameter of the measuring cups. When I started the implementation phase, I was thinking one-to-one, so rather than height and radius of the cups being equal as in the design phase, I produced cups whose height and diameter are equal. So they all ended up taller and thinner than the images in the design post, but that doesn’t affect the intrinsic volume relationships.

To create prototypes, I had access to an XYZprinting Nobel 1.0a SLA 3D printer. The software for this printer likes to import

`pent = parametric_plot3d((Px, Py, Pz), (0,1), (0, tau), plot_points=[40,6])` followed by `pent.show()` produces the following.
(It might seem fishy that you use 6 points in the t-direction of the mesh to get 5-sided figures, but note that t=0 and t=τ, the first and sixth points, actually represent identical points because of the τ-periodicity of the circle parametrization.)

The other two shapes are similar, although you have to be careful with the prism; since it has a corner, you can arrange that as h goes from 0 to 1/2, r goes from 0 to r13 while z stays put at 0, and as h goes from 1/2 to 1, r stays put at r13 and h goes from 0 to H. In SageMath, this looks like `def r(h): return min(r13,2*h*r_13)` and `def Fz(h, t): return max(0, 2*(h-0.5)*H)`. Here are images of the resulting plots:

To get these plots out of SageMath as STL files, the commands look like:

```p_stl = pent.stl_ascii_string()
pfile = open('/path/to/your/file','w')
pfile.write(p_stl)
pfile.close()
```

Unfortunately, these STL files are not ready to print directly; they consist of just a “membrane” with no real thickness. To make something printable, we need to thicken them up and add handles and labels and such. There are many possible packages one might use to do that; I chose MeshMixer, a free but closed-source program from AutoDesk. MeshMixer has a tool called “Offset” (that is only available when you have a surface selected) that is tailor-made for turning a surface into a thick wall. However, to keep the top lip of the cup flat, you should first mirror the cup as in the left picture below, then use an Offset of 2mm in the “Normal” direction, and slice off half of the result to get something looking like the right-hand picture below.

You can then use the rectangular solid primitive to add a handle. It’s floating separate from the cup, so you have to cut open some apertures on the cup and handle, and then use the “Bridge” and/or “Erase & Fill” tools to join them.

Finally, once the handle is fully attached, you can use MeshMixer’s letter embossing facility to add the caption on the handle. (I’ve also used some Boolean operations to cut a hole in the end of the handle.)

Or, here it is in live 3D:

(In case you’re interested, here are direct links to all three STL files: quarter cup, 3/4 cup, one cup.)

Now you could transfer the resulting STL to XYZprinting’s software, but in my experience the support-generation code in their software is not as reliable as that in MeshMixer. So under Analyze, use the “Overhangs” tool to generate supports. Now transfer to XYZprinting and have it “slice” and print the model to get your prototype!