Doodling with trig and loops
By: Elliot Bendoly
Trigonometry visualized in Excel

Trigonometry visualized in Excel

OK, to start let me be clear about something: What you are seeing here isn’t the result of my current research. I didn’t spend months laboring over the collection of data rendered in these images, or days over its analysis. In contrast to the primary and secondary data that provides the foundation of my own research, the numbers behind these images are almost entirely computer-generated.

Apart from this, what do all of these images have in common?

A few things that might be surprising.

First, they were all drawn in … Microsoft Excel. An odd choice, one selected to prove a point—that we have an uncanny tendency to typecast tools and disregard their other capabilities. Ubiquitous desktop applications are a great example. It’s useful to demystify visualization tasks. Even complex ones are much more within reach for many (not all) applications than is often imagined.

Second, each of these images was constructed using simple trigonometric equations, with only slight modifications in each instance. Coupled with a little repeated computation (available in this case through loop structures in VBA), these extremely basic equations can go an impressive way. In this case, I’m tweaking only four inputs (a,b,c,d) and letting the computer run with it. The majority of the code used is provided for those interested.

Of course, there’s no reason to limit ourselves to two dimensions when exploring where basic mathematical building blocks, a little computer code, and available visual renderings can take us. Leveling up a bit, only a slight increase in code and applied trigonometry gets us into a much more interesting space. Here again I’m restricting myself to rendering the resulting visuals to a relatively limited environment, essentially using cells in a spreadsheet as I might pixels in an image. (Incidentally, to see this kind of thing taken to an extreme, see the work of Tatsuo Horiuchi: In this case, simple conditional formatting is used to apply colors to cells based on content, and a first step in generating a higher dimensional rendering is achieved, just barely, through the 3D bar chart option in Excel (not one I typically use, but one that provides an interesting perspective here).

But again, all of this is just a teaser. There’s a broader reason why I wanted to use a pseudo-pixilation approach to begin with. It’s a convenient means to an end, for test-casing graphical “formulae” that might be applied in a more compelling context.

And thanks to the gaming community (of which I am only really cognizant because of my son), we have many. As a result, these mathematical visual renderings need not reside in isolation. They can become the foundation of enhancements to entire virtual worlds (as presented below, where I’ve taken the math and programming into the world of Minecraft via Python). It’s not the Hagia Sophia, but, hey, it’s only a few lines of code. If a few lines of code and a little math can get you this far, imagine where some serious study in applied mathematics, computer science, and context-specific visualization can take you.

A few lines of code in Minecraft via Python

A few lines of code gets interesting in Minecraft via Python

About The Author

Dr. Bendoly’s current research interests focus on the interface between operations, information technology and psychology (group and individual), including collaboration and group dynamics; work policies, task complexity and uncertainty; and operations/strategy/technology alignment.


Add a Comment

To add a comment you must be signed in.

Share this page
Suggested Articles
Columbus tops for tech workers

Columbus, Ohio, tops SmartAsset‘s list of Best Cities to Work in Tech in 2017. The site, which provides tools to aid financial decision-making, notes that “the city also benefits from being...

To be translational, data analytics must consider data context and meaning

Data analytics can be computationally powerful and sophisticated but not be translational or have much leverage in the real world. This is a cautionary note about the dangers of big...

Nandi receives IEEE Early Career Award, credits collaborators

Arnab Nandi The notion of a database search without a keyword sounds paradoxical. How can you search for something you can’t name? TDA affiliate Arnab Nandi, PhD, Assistant Professor in Computer...

New partnership links datasets to improve food systems

Perhaps you’re eating an apple while reading this. How did that apple arrive at your hand? How far did it travel to get to your grocery store, cafeteria, or farmer’s...

What wind, currents, and geography tell us about how people first settled Oceania

Just look at a map of Remote Oceania – the region of the Pacific that contains Hawaii, New Zealand, Samoa, French Polynesia and Micronesia – and it’s hard not to...