I just completed the first one, which uses the fractal property of self-similarity: each outer circle is split into two smaller circles. Of course, if it were a true fractal, the process would repeat ad infinitum, but due to the limitations of working with glass I had to stop after four iterations.

]]>Several years ago, I came across some videos by the artist Dearing Wang that showed how to create mandalas and other geometric figures using only a compass and straightedge. One of them was a figure he called a “Geometric Eye“. Drawing one by hand took hours. Using the online Desmos math app, you can create one in minutes! Here’s my screencast explaining how:

]]>Before I go any further, I want to give credit to Steve Phelps for posting a demo of this technique on his Twitter feed. If you are a math teacher, you really should follow him @MathTechCoach. I have learned more cool tech tricks from him than anyone else online.

Here’s my screencast illustrating how to create your very own rotated solids:

]]>What Hath the Train Wrought, Part I

]]>

This year I am once again teaching my Mathematician As Artist course. We began by creating art using only a straight-edge and compass. These designs were based on a process pioneered by Dearing Wang:

Next, we constructed Voronoi Diagrams by hand. Here’s an excellent tutorial on the process. In a Voronoi Diagram, each color represents all the points that are closest to the node (the black point) within that color.

Our latest project involved using Chaoscope to create fractals. It’s an easy program for a beginner, but there are endless options for more advanced users. Here are the students’ pieces:

I will do a separate post for my students’ final projects – stained-glass windows!

]]>

In Geogebra, construct a segment, then construct the midpoint. Construct a circle using the midpoint as center, and an endpoint of the segment as a point on the circle. In the Input pane, enter Circumference(<your circle>). When you divide the circumference measurement by the diameter length, you get pi! Geogebra is dynamic, so you can change the size of the circle, but the ratio will remain constant at pi.

Here’s an interactive version for you to play with at Geogebra’s site.

Here’s a screenshot:

All of my students have TI-84 graphing calculators, so I am going to have them use their Geogebra constructions to generate 10-12 different diameters and circumferences. Then we will enter the diameters in L1, the circumferences in L2, and plot the data. We will calculate the regression line, the slope of which should approximate pi.

Happy Pi Day!

Update: This went really well in my geometry class. Here’s the data we collected –

Here’s the regression line equation (check out the value of the slope):

And here is the plot of the data and the regression line:

]]>

Here’s the code:

void setup() {

size(600, 400);

}

void draw() {

//Sky-blue background

background(0, 191, 255);

//For the drawFlower function, enter the x-coordinate of the flower’s center,

//the y-coordinate, and the r, g, b values for the petals.

drawFlower(100, 85, color(255, 255, 0));

drawFlower(200, 100, color(255,69,0));

drawFlower(150, 200, color(218,112,214));

drawFlower(300, 225, color(230,230,250));

drawFlower(400, 80, color(250,250,210));

drawFlower(480, 150, color(255,99,71));

drawFlower(440, 230, color(138,43,226));

}

void drawFlower(int centerX, int centerY, color c) {

//Draw the stem

stroke(0, 255, 100);

strokeWeight(4);

line(centerX, centerY + 15, centerX, centerY + 115);

//Draw the leaves

fill(0, 255, 100);

ellipse(centerX-40, centerY+40, 80, 20);

ellipse(centerX+40, centerY+40, 80, 20);

//Draw the center of the flower

stroke(0);

fill(0);

ellipse(centerX, centerY, 30, 30);

//Draw the petals

stroke(c);

fill(c);

ellipse(centerX, centerY+40, 20, 40);

ellipse(centerX-40, centerY, 40, 20);

ellipse(centerX+40, centerY, 40, 20);

ellipse(centerX, centerY-40, 20, 40);

}

]]>You can view the actual project here: https://www.openprocessing.org/sketch/480556#

Here is the code:

float x = 200;

float y = 0;

int speedX = 1;

float speedY = 0;

float gravity = 0.1;

void setup() {

//Set window size

size(800,600);

}

void draw() {

//Draw a black background

background(0);

//Set ellipses and rects to CENTER mode

ellipseMode(CENTER);

rectMode(CENTER);

//Change the x location by speedX

x = x + speedX;

//If dog reaches edge, reverse course

if ((x > width)|(x < 0)) {

speedX = speedX*-1;

}

//Start y dropping

y = y + speedY;

speedY = speedY + gravity;

//Draw the body

strokeWeight(5);

stroke(100,0,0);

fill(0.5*x,y,x);

rect(x, y, 300,150);

//Draw the head

fill(200,50,50);

ellipse(x+225, y, 150,200);

//Draw the mouth and nose

strokeWeight(10);

line(x + 200, y + 40, x + 250, y + 40);

line(x + 225, y – 25, x + 225, y + 25);

//Draw the eyes

strokeWeight(0);

fill(0,50,200);

ellipse(x + 200, y- 30, 30, 50);

ellipse(x + 250, y – 30, 30, 50);

//Draw the legs

strokeWeight(20);

line(x – 100,y + 75,x – 150, y + 150);

line(x – 100, y + 75, x – 50, y + 150);

line(x + 100, y + 75, x + 50, y + 150);

line(x + 100, y + 75, x + 150, y + 150);

//Draw the tail

strokeWeight(25);

line(x – 150,y, x – 250, y – 100);

//Bounce back up

if (y > height) {

speedY = speedY*-0.95;

y = height;

}

}

]]>

- Plot a point (x0, y0) anywhere inside the triangle.
- Use a random number generator to generate 1, 2, or 3 randomly.
- If 1 comes up, plot the midpoint between vertex #1 and (x0, y0).
- If 2 comes up, plot the midpoint between vertex #2 and (x0, y0).
- If 3 comes up, plot the midpoint between vertex #3 and (x0, y0).
- Make your new point (x0, y0).
- Repeat the process.

Even though the locations of the points are being generated randomly, a very interesting picture emerges. Here is after 100 iterations:

And here is the result after 1000 iterations:

And here it is after 10,000. It’s pretty clear that we’re getting the Sierpinski Triangle!

Here’s the code:

float x1 = width/2;

float y1 = 0;

float x2 = 0;

float y2 = height;

float x3 = width;

float y3 = height;

float x0 = width/2;

float y0 = height/2;

size(600, 600);

background(0);

stroke(255);

frameRate(5);

for (int i = 1; i < 10000; i = i + 1) {

int roll = int (random(0, 4));

if (roll == 1) {

x0 = (x0 + x1)/2;

y0 = (y0 + y1)/2;

point(x0, y0);

} else if (roll == 2) {

x0 = (x0 + x2)/2;

y0 = (y0 + y2)/2;

point(x0, y0);

} else {

x0 = (x0 + x3)/2;

y0 = (y0 + y3)/2;

point(x0, y0);

}

}

Here’s a gif of 3 seconds of it in action:

]]>

Processing uses simple commands like *ellipse(centerX, centerY, width, height)*, or *line(X1, Y1, X2, Y2)*. If you’re familiar with coordinate geometry, then coding in Processing is a piece of cake. And did I mention it’s open-source, which means it’s completely free? The Processing website (linked above) has a fantastic reference that covers all of the commands and their parameters.

Here is my first project, which is the result of working through the first three chapters. I think I’ll call him Hypno-Dog, because I made his eyes change color.

]]>Why are they called conics? Well, we can construct them using cones, as illustrated by this demo, courtesy of

Here are my screencasts:

Conic Basics

The Parabola

The Ellipse

The Hyperbola

]]>Here are the parameters:

]]>