AcademiaAgriculture & FarmingHumanitiesSocial SciencesSTEM

How to Draw Butterflies on a Graphing Calculator

Updated on June 08, 2016
calculus-geometry profile image

TR Smith is a teacher and creator who uses mathematics in her line of work every day.

Graph of r(θ) = 8 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 3cos(2θ) - 2cos(4θ). Source for this image and all others: Screenshot of online graphing calculator output.
Graph of r(θ) = 8 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 3cos(2θ) - 2cos(4θ). Source for this image and all others: Screenshot of online graphing calculator output.

Graphing calculators are not just for plotting functions and solving equations; they can also be used to generate intricate pictures using mathematical equations. In rectangular coordinates you can easily draw faces and other scenes by graphing a collection of semi-circular arcs and line segments. The trick is to figure out the right equation for each curve and line. But with polar coordinates you can trace the outline of a shape with a single polar function.

When calculus students learn polar coordinates, the first curves they learn how to graph are symmetric n-petaled flowers with polar equations of the form r(θ) = A + B*sin(nθ) + C*cos(nθ), where A, B, C, and n are parameters that determine the general shape and orientation of the flower.

Using this basic equation as a foundation, you can develop more complicated polar equations that produce more elaborate and intricate closed curves resembling butterflies. If you work with scalable vector graphics (SVG) programs, you can quickly create a variety of butterfly curves with polar coordinate equations. The example graphs in this tutorial were generated with Desmos Online Graphing Calculator.


Basic Butterfly Curve Equation

In polar coordinates, you can draw symmetric, top-oriented butterfly-shaped closed curves using polar equations of the form

r(θ) = constant + sum{ coeff*sin(odd*θ) } + sum{ coeff*cos(even*θ) }

In other words, a constant term plus sine functions with odd frequency parameters plus cosine terms with even frequency parameters. Following this general pattern you can create left-right symmetric butterflies with the head at the top of the wing area. The coefficients of the sine and cosine terms can be any real numbers, and there's no limit to how many sine and cosine terms you can have, or how large the frequency parameters are. However, not every combination of coefficients will produce a butterfly, so trial and error is necessary to get the shape just right. The butterfly graph at the top of this article is generated by the equation

r(θ) = 8 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 3cos(2θ) - 2cos(4θ)

Here the constant term is 8. The sine function group is -sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) with frequency parameters 1, 3, 5, and 7. The cosine function group is 3cos(2θ) - 2cos(4θ) with frequency parameters 2 and 4. The constant term and coefficients don't have to be integers, but the frequency parameters do.

Next we will see how varying the parameters of this function produces butterfly curves with different effects.


Varying the Constant Term: Making the Butterfly Fatter

The magnitude of the constant term relative to the coefficients of the sine and cosine terms governs how delicate or meaty the butterfly is.

Click thumbnail to view full-size
Graph of r(θ) = 7 - 0.5sin(θ) + 2.5sin(3θ) + 2sin(5θ) - 1.7sin(7θ) + 3cos(2θ) - 2cos(4θ) - 0.4cos(16θ)Graph of r(θ) = 9 - 0.5sin(θ) + 2.5sin(3θ) + 2sin(5θ) - 1.7sin(7θ) + 3cos(2θ) - 2cos(4θ) - 0.4cos(16θ)Graph of r(θ) = 12 - 0.5sin(θ) + 2.5sin(3θ) + 2sin(5θ) - 1.7sin(7θ) + 3cos(2θ) - 2cos(4θ) - 0.4cos(16θ)Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)Graph of r(θ) = 9 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)Graph of r(θ) = 11 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)Graph of r(θ) = 13 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)Graph of r(θ) = 6 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 10 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 0.5sin(θ) + 2.5sin(3θ) + 2sin(5θ) - 1.7sin(7θ) + 3cos(2θ) - 2cos(4θ) - 0.4cos(16θ)
Graph of r(θ) = 7 - 0.5sin(θ) + 2.5sin(3θ) + 2sin(5θ) - 1.7sin(7θ) + 3cos(2θ) - 2cos(4θ) - 0.4cos(16θ)
Graph of r(θ) = 9 - 0.5sin(θ) + 2.5sin(3θ) + 2sin(5θ) - 1.7sin(7θ) + 3cos(2θ) - 2cos(4θ) - 0.4cos(16θ)
Graph of r(θ) = 9 - 0.5sin(θ) + 2.5sin(3θ) + 2sin(5θ) - 1.7sin(7θ) + 3cos(2θ) - 2cos(4θ) - 0.4cos(16θ)
Graph of r(θ) = 12 - 0.5sin(θ) + 2.5sin(3θ) + 2sin(5θ) - 1.7sin(7θ) + 3cos(2θ) - 2cos(4θ) - 0.4cos(16θ)
Graph of r(θ) = 12 - 0.5sin(θ) + 2.5sin(3θ) + 2sin(5θ) - 1.7sin(7θ) + 3cos(2θ) - 2cos(4θ) - 0.4cos(16θ)
Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)
Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)
Graph of r(θ) = 9 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)
Graph of r(θ) = 9 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)
Graph of r(θ) = 11 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)
Graph of r(θ) = 11 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)
Graph of r(θ) = 13 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)
Graph of r(θ) = 13 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.4sin(9θ) - 0.4sin(25θ) + 3cos(2θ) - 2cos(4θ) - 0.2cos(26θ)
Graph of r(θ) = 6 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 6 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 10 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 10 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)

The set of graphs above depicts butterflies that have the same function except for the constant term.

In the set of three blue butterflies, the constant term ranges from 7 to 9 to 12. The butterfly with a coefficient of 7 looks more delicate than the other two; the butterfly with a coefficient of 12 looks fat. If you increased the constant term to 100 or 200, the graph would no longer resemble a butterfly, but would look more like a circle with dimples around the circumference.

In the set of four orange butterflies, the constant terms are 7, 9, 11, and 13. As the constant term increases, the butterfly becomes heftier. In the set of three green butterflies, the constant terms are 6, 8, and 10.


Changing the Frequency Parameters of Sine and Cosine: Making Asymmetric Butterfly Curves

To make an imperfect butterfly with mismatched wings, you must adulterate the standard equation with terms of the form coeff*sin(even*θ) and/or coeff*cos(odd*θ).

The smaller the value of the coefficient relative to the other coefficients, the less noticeable the asymmetry. For example, adding 0.1sin(6θ) or -0.1cos(5θ) to the general equation will wobble the wings only slightly if the other coefficients have an absolute value greater than 1. Here are some examples of asymmetric butterfly curves in polar coordinates.

Click thumbnail to view full-size
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(10θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(10θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(6θ) + 0.5sin(9θ)  + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(6θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(7θ)Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ) + 0.5cos(9θ)Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.3cos(9θ)Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(12θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(14θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(8θ) + 4.8cos(2θ) - 2cos(4θ) + 0.3cos(9θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(10θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(10θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(10θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(10θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(6θ) + 0.5sin(9θ)  + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(6θ) + 0.5sin(9θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(6θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(6θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(7θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(7θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ) + 0.5cos(9θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ) + 0.5cos(9θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.3cos(9θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.3cos(9θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(12θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(12θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(14θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(14θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(8θ) + 4.8cos(2θ) - 2cos(4θ) + 0.3cos(9θ)
Graph of r(θ) = 7 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(8θ) + 4.8cos(2θ) - 2cos(4θ) + 0.3cos(9θ)

Fractional Frequency Parameters: Making Double-Traced and Triple-Traced Butterfly Curves

To make the butterfly equation trace out in criss-crossing arcs, you must change at least one of the frequency parameters to a rational number that is not an integer. For double-traced butterflies, it requires half-integers, e.g., 1.5, 2.5, 3.5, 4.5, etc. For triple-traced butterflies you need to use third-integers, e.g., 5/3, 7/3, 8/3, 10/3, 11/3, 13/3, etc.

In order for an n-traced curve to come full circle, θ must range from 0 to 2nπ, so you will have to adjust the default on your graphing calculator or SVG program. Here are some examples of double- and triple-traced butterfly curves.

Click thumbnail to view full-size
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7.5θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(6.5θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(18.5θ)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11.5θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(18.5θ)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9.5θ) - 0.3sin(11.5θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(16.5θ)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(28θ/3) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(23θ/3)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(26θ/3) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(22θ/3)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(26θ/3) - 0.3sin(61θ/3) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(22θ/3)Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(22θ/3) + 0.8sin(26θ/3) - 0.3sin(61θ/3) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(22θ/3)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7.5θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7.5θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(6.5θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(6.5θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(18.5θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(18.5θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11.5θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(18.5θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11.5θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(18.5θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9.5θ) - 0.3sin(11.5θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(16.5θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9.5θ) - 0.3sin(11.5θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(16.5θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(28θ/3) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(28θ/3) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(8θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(23θ/3)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(23θ/3)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(26θ/3) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(22θ/3)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(26θ/3) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(22θ/3)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(26θ/3) - 0.3sin(61θ/3) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(22θ/3)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(26θ/3) - 0.3sin(61θ/3) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(22θ/3)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(22θ/3) + 0.8sin(26θ/3) - 0.3sin(61θ/3) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(22θ/3)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(22θ/3) + 0.8sin(26θ/3) - 0.3sin(61θ/3) + 4.8cos(2θ) - 2cos(4θ) + 0.5cos(22θ/3)

If one of the frequency parameters is set to an irrational number, the curve will never close on itself. An n-traced butterfly curve will not be perfectly symmetric, but the higher the value of n, the less noticeable the asymmetry is. The butterfly below is 5-traced, since the parameter 13.2 = 66/5.

Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.8cos(13.2θ)
Graph of r(θ) = 8 - 1.2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.8sin(9θ) - 0.3sin(11θ) + 4.8cos(2θ) - 2cos(4θ) + 0.8cos(13.2θ)

Large Frequency Parameters: Making Fuzzy Wing Effects

To add some fuzz around the wings, you must introduce sine and/or cosine terms with high frequency parameters. The higher the parameter, the tighter the fuzz. The larger the coefficient, the more pronounced it will be.

Click thumbnail to view full-size
Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.2sin(69θ) + 3cos(2θ) - 2cos(4θ)Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 3cos(2θ) - 2cos(4θ) + 0.3cos(64θ)Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 3cos(2θ) - 2cos(4θ) + 0.7cos(50θ)Graph of r(θ) = 7 - 2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) -0.4sin(51θ)+ 3cos(2θ) - 2cos(4θ) + 0.7cos(50θ)Graph of r(θ) = 7 - sin(θ) + 2.5sin(3θ) + 1.5sin(5θ) - 2sin(7θ) -0.4sin(121θ)+ 3cos(2θ) - 2cos(4θ) + 0.7cos(30θ)Graph of r(θ) = 7 - sin(θ) + 2.5sin(3θ) + sin(5θ)  -0.4sin(121θ)+ 3cos(2θ) - 2cos(4θ) + 0.7cos(80θ)Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ) +0.4e^sin(51θ) + 4cos(2θ) - 3cos(4θ)Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ) +0.4e^sin(91θ) + 4cos(2θ) - 3cos(4θ)Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ)  + 4cos(2θ) - 3cos(4θ) + 0.3e^cos(80θ)Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ)  + 4cos(2θ) - 3cos(4θ) + 0.5e^cos(30.5θ)
Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.2sin(69θ) + 3cos(2θ) - 2cos(4θ)
Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 0.2sin(69θ) + 3cos(2θ) - 2cos(4θ)
Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 3cos(2θ) - 2cos(4θ) + 0.3cos(64θ)
Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 3cos(2θ) - 2cos(4θ) + 0.3cos(64θ)
Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 3cos(2θ) - 2cos(4θ) + 0.7cos(50θ)
Graph of r(θ) = 7 - sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) + 3cos(2θ) - 2cos(4θ) + 0.7cos(50θ)
Graph of r(θ) = 7 - 2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) -0.4sin(51θ)+ 3cos(2θ) - 2cos(4θ) + 0.7cos(50θ)
Graph of r(θ) = 7 - 2sin(θ) + 2sin(3θ) + 2sin(5θ) - sin(7θ) -0.4sin(51θ)+ 3cos(2θ) - 2cos(4θ) + 0.7cos(50θ)
Graph of r(θ) = 7 - sin(θ) + 2.5sin(3θ) + 1.5sin(5θ) - 2sin(7θ) -0.4sin(121θ)+ 3cos(2θ) - 2cos(4θ) + 0.7cos(30θ)
Graph of r(θ) = 7 - sin(θ) + 2.5sin(3θ) + 1.5sin(5θ) - 2sin(7θ) -0.4sin(121θ)+ 3cos(2θ) - 2cos(4θ) + 0.7cos(30θ)
Graph of r(θ) = 7 - sin(θ) + 2.5sin(3θ) + sin(5θ)  -0.4sin(121θ)+ 3cos(2θ) - 2cos(4θ) + 0.7cos(80θ)
Graph of r(θ) = 7 - sin(θ) + 2.5sin(3θ) + sin(5θ) -0.4sin(121θ)+ 3cos(2θ) - 2cos(4θ) + 0.7cos(80θ)
Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ) +0.4e^sin(51θ) + 4cos(2θ) - 3cos(4θ)
Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ) +0.4e^sin(51θ) + 4cos(2θ) - 3cos(4θ)
Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ) +0.4e^sin(91θ) + 4cos(2θ) - 3cos(4θ)
Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ) +0.4e^sin(91θ) + 4cos(2θ) - 3cos(4θ)
Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ)  + 4cos(2θ) - 3cos(4θ) + 0.3e^cos(80θ)
Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ) + 4cos(2θ) - 3cos(4θ) + 0.3e^cos(80θ)
Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ)  + 4cos(2θ) - 3cos(4θ) + 0.5e^cos(30.5θ)
Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ) + 4cos(2θ) - 3cos(4θ) + 0.5e^cos(30.5θ)

For example, adding the term 0.1cos(100θ) will produce denser fuzz than 0.1cos(50θ). Adding the term 0.8sin(49θ) will produce more pronounced fuzz than 0.1sin(49θ). Many examples are shown in the images above. In the last image, the double-traced fuzz effect is caused by the term 0.5e^cos(30.5θ).


Alternative Polar Equation Forms for Butterflies

Functions of the form r(θ) = constant + sum{ coeff*sin(odd*θ) } + sum{ coeff*cos(even*θ) } are not the only ones that can produce butterfly curves. As long as the function is periodic without asymptotes, the function has the potential to produce a butterfly-shaped curve.

Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ)  + 4cos(2θ) - 3cos(4θ)
Graph of r(θ) = 8 - e^sin(θ) + e^sin(3θ) + e^sin(5θ) + 4cos(2θ) - 3cos(4θ)

In the butterfly curve above, the sin(odd*θ) terms have been replaced with e^sin(odd*θ). The functions e^sin(x) and e^cos(x) are periodic, so they can be added to the basic form to produce polar equation butterfly curves.

If you add polynomial terms such as θ, θ^2, θ^3, etc. or pure exponential terms of the form b^θ, the curve will spiral outward and never close.

Even though the functions tan, cot, sec, and csc are periodic, they have asymptotes and therefore won't produce a closed curve either.


Drawing Butterflies on a TI-84 Plus Graphing Calculator

Texas Instruments' TI-84 Plus graphing calculator has an easy-to-use interface for plotting functions in rectangular, polar, and parametric coordinates, and is the most commonly used graphing utility used in schools.

To draw butterfly curves on a TI-84 Plus, first set the graphing mode to polar coordinates by pressing the "Mode" key and selecting "Par" in the menu. Then, press the "Y=" key to access the function input screen. Enter the polar function, using the "XθTn" key to input the variable θ. In the window menu, make sure that the range of θ is at least [0, 2π]. If you used any terms of the form cos(θ*m/n) or sin(θ*p/q), then you'll need to increase the range to [0, 2kπ], where k is the least common multiple of the denominators of the fractional coefficients. For example, if you have sin(θ*37/15) and sin(θ*4/6) in your equation, then you need to set the θ range to [0, 60π], since the lcm of 15 and 6 is 30. Zoom in or out as necessary to view the entire butterfly.

Comments

    0 of 8192 characters used
    Post Comment

    • paxwill profile image

      paxwill 3 years ago from France

      Very cool! Those poor asymmetric butterflies look like they got stepped on.

    • paxwill profile image

      paxwill 3 years ago from France

      Here's my attempt at making one with a more defined head

      http://s2.hubimg.com/u/8535681_f1024.jpg

      r = 7 - sin(θ) + 2.3sin(3θ) + 2.5sin(5θ) - 2sin(7θ) - 0.4sin(9θ) + 4cos(2θ) - 2.5cos(4θ) + 3/sqrt[1+16sin(5θ)^2]

      How did you get the Desmos calculator to add shading?

    • calculus-geometry profile image
      Author

      TR Smith 3 years ago from Germany

      Really nice specimen! To get the shading in Desmos I replaced the equals sign in the equation with a less than or equal to sign. Also, thanks for introducing me to Desmos in the first place.

    • Sivesh 3 years ago

      Thanks so much for this project. Works excellent on Ti-83 with polar coordinate setting.

    • LD 3 years ago

      So cool, I've seen hearts and flowers with this method, how do you make those shapes?

    • katieaschroeter profile image

      KatieSchroeter 3 years ago from Canada

      Really Cool. Thanks for sharing it.

    • Nissie 3 years ago

      So beautiful, will have to try it on my daughter's graphing calculator.

    • Rae-LeighDawn profile image

      Rae-LeighDawn 2 years ago

      I'm in love

    • colorfulone profile image

      Susie Lehto 23 months ago from Minnesota

      I'm not going to pretend I know anything about this. I think it is cool beans that you can create so many different shapes of butterflies on a graphing calculator.

    • bryn 20 months ago

      thank this is exactly what i was looking for.

    Click to Rate This Article