I had a crash reported for one of my Android applications. Thankfully that includes a stack trace, because I would never have found this bug without it. I learned something new about concurrently accessing an ArrayList.

You can make a straight section with two rings of points; just orient one ring like so, the other ring like so, and draw triangles between them. For a curve, just string a bunch of short straight pieces together.

Almost but not quite. Why the hell is there that pinched part in the curved pipe?

The problem is that the orientation of the rings is not as simple as “normal to the pipe’s tangent”. But a ring is a circular-symmetrical thing, right, so rotation about the pipe’s tangent shouldn’t really matter. Right?

Say you’ve got some points in a plane, and you’re fixin’ to triangulate them. Specifically, you’re going to generate the Delaunay triangulation with an incremental algorithm, and then of course you’re going to want the triangles and/or segments.

Now say you’re doing this in Java, and you’re doing it many times over, and you’re doing it on battery power, so you have to do it efficiently.