# Parametric Parrot

A few weeks ago,
Jonni Walker retweeted the following, which showed birds creating through use
of equations discovered by Hamid Naderi Yeganeh:

— Marcus Volz (@marcus_volz) March 25, 2018

I replied saying
that I would definitely be trying to recreate one of these in Tableau. This
week, I finally had a chance to sit down and give it a try. After fighting with
the equations a bit, I was finally able to create this:

We tend to think of math as something that is black and white, boring, and always follows the rules. While this can sometimes be the case, math can also be breathtakingly beautiful as these equations demonstrate.

**Creating Your Own**

If you’d like to
create one of these beautiful images, then let me briefly explain how. First, please
read my blog, Beyond Show Me Part 3: Parametric Equations. This will walk you through the
process of using parametric equations to plot a circle. While a circle is
relatively simple, the same basic technique applies to more complex curves.
Once you have this foundation, go find an image that’s been plotted using parametric
equations and convert the equation to Tableau code. The hardest part of this, by
far, is that translation process. For example, the parrot visualized above has
the formula:

(-5/4)(cos(37Ï€k/10000))^

__x__
(3k/20000)+(cos(37Ï€k/10000))^

^{6}sin((k/10000)^^{7}(3Ï€/5))+(9/7)(cos(37Ï€k/10000))^^{16}(cos(Ï€k/20000))^^{12}sin(Ï€k/10000)

__y__(-5/4)(cos(37Ï€k/10000))^

^{6}cos((k/10000)^

^{7}(3Ï€/5))(1+3(cos(Ï€k/20000)cos(3Ï€k/20000))^

^{8})+(2/3)(cos(3Ï€k/200000)cos(9Ï€k/200000)cos(9Ï€k/100000))^12

In Tableau, these translate to the
following:

__x__
(3*[t]/20000)+POWER((cos(37*[PI]*[t]/10000)),6)*sin(POWER(([t]/10000),7)*(3*[PI]/5))+(9/7)*POWER((cos(37*[PI]*[t]/10000)),16)*POWER((cos([PI]*[t]/20000)),12)*sin([PI]*[t]/10000)

__y__
(-5/4)*POWER((cos(37*[PI]*[t]/10000)),6)*cos(POWER(([t]/10000),7)*(3*[PI]/5))*(1+3*POWER((cos([PI]*[t]/20000)*cos(3*[PI]*[t]/20000)),8))+(2/3)*POWER((cos(3*[PI]*[t]/200000)*cos(9*[PI]*[t]/200000)*cos(9*[PI]*[t]/100000)),12)

These certainly look ugly and it can be
challenging to perform these conversions, especially when the source equations
could be displayed in varying formats, but once you get the hang of it, you can
get through it fairly quickly.

If you’d like to give this a try, then here are a couple of places where you can find some beautiful parametric equations:

- Follow Hamid Naderi Yeganeh on Twitter.
- The Huffington Post has featured a few of Mr. Yeganeh’s equations here: Birds in Flight and Butterflies.
- A number of other equations by Mr. Yeganeh can be found on the American Mathematical Society website.
- Life Through a Mathematician’s Eyes has some nice equations.
- Or just search or “Beautiful Parametric Equations”

As always, if you build something using these techniques, I’d love to see them!!

And, because I enjoy creating these so much, here are a few more created from Mr. Yeganeh's equations.

Ken Flerlage, April
19, 2018

## No comments: