# Painting Easter Eggs with PTC Mathcad

﻿

A couple of weeks ago, some friends and I were discussing different Easter traditions, and the consensus was that the traditions are all over the board. Some had very specific Easter Sunday meals, whereas I was unaware that there was such a thing as “Easter food” other than candy and chocolate. Easter is a big holiday for my family, but I simply can’t remember any particular food we’d prepare for lunch or dinner.

I do remember the Easter Egg Hunts, though. I have to be honest: I was still participating in my family’s Easter Egg Hunt when I was in college. One year, I brought some of my friends from Saudi Arabia home for the long Easter weekend, and I got to watch them at their first Easter Egg Hunt, which we participated in alongside elementary schoolers and toddlers (we left the easy eggs for the young ones, though—mostly).

I also remember dying Easter eggs. Apparently some people will poke holes in the eggshells and drain out the actual egg part before painting/dying them. I guess it makes sense, because then the eggs won’t rot. But my family would just hardboil them before dying them. And yes, we dyed them; we didn’t paint. The smell of white vinegar dissolving the little food coloring tablets in various bowls. The patience required to get the egg the deepest shade of blue possible. The competitions to see who could make the prettiest egg. Ahhh, the memories.

Well, I’m sad to say, I won’t be with my family for Easter this year, so I’ll get to participate in none of my beloved traditions. But you know what? At least I have PTC Mathcad with me for Easter this year (bet you’ve never heard that one before!)

Instead of dying eggs in low-quality and hopefully non-toxic food coloring, I did my egg decorating with PTC Mathcad. I looked up some parametric eggquations (I didn’t come up with that pun, but I still love it!) so that I could plot some eggs. For 3D, I created this function:

Using different ranges for φ, I got a beautiful 3D egg.

This was pretty cool, in my opinion, but my options for decorating were limited, so I moved on to 2D with these equations:

That function got me an egg shape, but I needed to add designs to my eggs. So I created a function to create circles of different sizes (and even ellipses if I want).

Those circles were good, but weren’t quite enough. I wanted squiggly lines and zig zags to go around the eggs. I’ll be honest, this wasn’t very straight forward. There may be an easier way, but I certainly couldn’t find it. I had to use a combination of a parameterized solve block and a while loop to get what I wanted. I won’t go into the details, but these functions allow me to change the vertical location, the period/frequency, and the amplitude of the drawn lines.

But the effort paid off.

Want to create your own Easter eggs in PTC Mathcad? Download the worksheet I used here and give it a try! Don’t forget to show us your masterpieces!

Don't have PTC Mathcad?  Try our free for life version PTC Mathcad Express.