Mathematical equations are always used to make predictions and carry out proofs. I wanted to break this trend and explore the ways that equations could be used qualitatively to describe art — in particular, how they can be used to paint Easter Eggs. Using Mathematica, I created a three-dimensional egg shape via the parameterization via a perturbation of a sphere (c=0.2=,b=1.65):
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.
The first mathematical pattern that immediately came to mind for me was the SphericalHarmonicY function. This function is used for solving Laplace’s equation in spherical coordinates, so it already has a natural setting in our egg shape which has the same basic structure as a sphere. I then chose a color scheme that fit well with the pattern I had created. Here is an example of my Spherical Harmonics egg painted with the gradient “BlueGreenYellow”:
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.
At this point, I decided I needed to get a little bit more creative. Using predefined functions like SphericalHarmonicY was fun and all, but it also left me somewhat unsatiated. I began playing around with spirals, and here is one such example of an array of spirals with alternating handedness all over the sphere.
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:
All together, I made eleven Mathematically colored eggs that I considered worthy of keeping. The most difficult one was probably the Patriotic Star Egg shown in the bottom right corner. It required several heavy-duty functions working together to make the repeated star print like Floor, Mod, ArcTan, Abs, and Max. (I won’t do you the disservice of posting the entire function used.) Probably my favorite eggs are the two African Zig-Zag Eggs.