Decorating Eggs with Mathematica
A week or so ago I made an Easter egg in Mathematica and emailed around a bit to see if I could get other people to try it, too. I consulted with my family, dared readers of my blog to send me Mathematica eggs and mentioned my egg to my friend science-fiction writer Cory Doctorow, who blogged it on BoingBoing. I also spread the idea around Wolfram Research. As someone with a small collection of ornamental eggs in a glass case in my living room, I am quite pleased with the results.
Here’s how it came about: My kids are enthusiastic celebrators of holidays. They want to start decorating for Halloween in August, and decorating for Christmas as soon as the pumpkins and spider webs come down. Last week, I had bought a carton of eggs and a package of egg dye, and kept finding my kindergartner getting out the eggs or the dye without permission. So I’d promised that Thursday, absolutely, we would begin work on eggs.
I have a copy of Michael Trott’s The Mathematica GuideBook for Graphics, and on Thursday afternoon, my fifth-grader was flipping through it, looking at the pretty pictures. He saw a picture in it and asked if I could scan in and print out a picture like that on a sticker for him to put on an Easter egg. I decided he had a point there: that one could and should decorate eggs with Mathematica. The example he’d chosen was more elaborate than I was willing to take on in 3D, but I decided to see what I could do while we boiled the eggs.
I looked for something to work from and found the Ellipsoid Demonstration on the Wolfram Demonstrations Site. I adapted from that, using the mathematical description of an egg shape from Jürgen Köller’s website as my guide to egginess.
I had the basic egg by the time my kids got home from school Friday. I showed it to them and they were wildly enthusiastic. The instructions demanded that the eggs be cool for dyeing, and I had let them cool overnight so we could dye our eggs that afternoon. Dyeing eggs actually takes a while, so I was modifying the Mathematica egg notebook according to child requests while we let the eggs sit in their dye baths.
I tinkered with it and showed it to my dad, physicist John G. Cramer, who has been a Mathematica user since the beginning. He emailed me a notebook with some other ways to color the eggs. (My kids like their grandpa’s even better than mine.) Over the next few days he sent me a couple more, to rave reviews by my kids. I’d colored my eggs using Mathematica 6’s built-in color gradients. My dad used sinusoids, polynomials and the Riemann zeta function to generate his color patterns.
|Egg Colored by Gradients||Egg Colored with Sinusoids|
|Egg Colored using Polynomials||Egg Colored using the
Riemann Zeta Function
My daughter demanded printouts and made a little book that now runs about 25 pages, to which she has added her own annotations—some of our eggs now have fluorescent pink chicks hatching out of them. She has decorated the corner of the living room that she calls her clubhouse with cut-outs of the eggs and she used them as bait for her St. Patrick’s Day leprechaun trap.
So this was essentially a child-driven family art project that ultimately involved three generations.
By now others have had a crack at it, as it were, and there are a number of delightful methods of digital egg decorating and construction available on the Demonstrations site. Some are quite elaborate. My kids and I have spent an hour or two investigating possibilities, and there is still more to explore.
||Egg Shape Contruction||Eggs using Spherical
Additionally, bringing things full circle, Michael Trott—whose book inspired my son to ask for mathematical patterns on eggs in the first place—has created a really elaborate Mathematica notebook for making various types of traditional Eastern European eggs, which is available for download on his Mathematica GuideBook site. He says that the egg notebook will be expanded and included in the Version 6 edition of the Graphics volume.
So pretty – even my Mom like it! She is a teacher of art. Thanks for your lesson. I like this eggs like a rabbit) but I have a question – can I do a composition with these eggs. I mean 2 or 3 eggs near with right shadows and textures? Thanks again.
I may be too Late to see this & respond…but Better Late than Never…! :)
Beautiful work madame…kudos to your kids..as well as the child-like imagination & energy in you & your dad as well…!
Me SO Lucky to have stumbled upon Mathematica—i want to use it to popularize Mathematical & Scientific gems too…
For that, your work..is a Sheer Delight of Inspiration..! :)
I’m so “Egg-cited” now..! ;)
Do you do eggs with my design?