Creating curves with straight lines
Here is a video I recently made in response to Vi Hart’s great doodling game video. You take a curve, put dots evenly spaced (or however you want) along the line, and connect dots some predefined number apart. You can do this with any curve you want, but some results are more interesting than others. In some of the shapes, I highlighted the limiting envelope curve that is generated by the shapes. Enjoy!
And here is part of the video in gif form:


That red connector between the bottles creates a handle for easy transportation. Most people dispose of these connectors and consume the Red Juice with the help of friends. Cody manages to drink this quantity of juice in a few days and sets the connectors aside, initially out of laziness but soon building a collection of them.














Notice the wrinkle in the face loop close to the front! This is understandable; I began with a torus, and performed a twist on the vertices appropriately to create the rotation. But if you start with a standard belt of paper, you can’t expect to twist it without breaking and end up with a mobius strip! Consequently, all of that twisting had to “pile up” somewhere, and this is exactly where I will cut each wrinkled edge, and reapply the edges appropriately. This creates a perfectly and evenly twisted mobius torus. The changes in this procedure are shown with semi-transparent regions; look closely and you’ll see the wrinkles vanish!



















This surface has similar geometry to an egg, but is lackluster. At this point, it still has meshlines and a generic default color assigned by Mathematica. The eggs need some more spice. I decided I wanted to color them like Easter Eggs, but the constraint I imposed on myself was that the colored patterns would need to be created directly from mathematical functions inside of Mathematica. Each function would go from the surface of the surface of the sphere into the real numbers, and therefore could be thought of as a simple function of two variables, u and v. The output of this function could then be mapped to a color to represent the desired color at that point.
Thankfully, there were no problems matching up edges on the rectangle [0,2π]x[0,π], because the Spherical Harmonics are made especially for spheres. At this point, I couldn’t help but try changing parameters on the eggs to obtain different patterns. For instance, one such parameter represents the number of blobs of color going from the top to bottom of the egg. The other parameter represents how many blobs go all the way around the equator. By changing these parameters, you can obtain very different looking eggs, especially when you make one parameter much larger than the other to create “slits” of color. You can see an orange version of these Spherical Harmonics in the bottom picture in the orange-colored egg on the very left of the image. You can see that I cranked up the number of blobs of color I required to fit from north pole to south pole in that one.
The first think I noticed about the egg is the spirals, but if you look directly down on this model from the north or the south pole, you will see a four-petaled flower. What I find interesting about this activity is that it requires not only artistic creativity, but also a familiarity with the behavior of mathematical functions so that one can define an egg that resembles the image one had in ones mind before beginning the project. However, unlike this visually attractive egg, the mathematical coloring equation is no where near as elegant. Ignoring various rescaling done to account for the desired input range to specify the colors, the mathematical equation that I used to generate this pattern was:
