Thursday, January 31, 2019

Farey Sequences and Ford Circles in JavaScript


Like the phyllotaxis spiral, a nice mathematical figure to draw in code is the sequence of Ford Circles.

A while back I tried generating these using Fathom and Processing - now for fun I've tried them in JavaScript. A page to play with them is here, and the source code is in a Github repo.

On the page, you can control the level of the Farey sequence used to generate the circles - you start off with just 0 and 1:


Using the buttons provided, you can increase the number of terms in the sequence and the corresponding number of circles.


After a certain point, the page does not list the entire sequence associated with the circles.




Wednesday, January 30, 2019

an origami surprise

For a recent origami-based math activity, I gave students printed instructions for two origami models: a pinwheel, and an open-top masu box (both from Origami USA).


They were to learn how to fold the models and answer some questions about the results:
Assuming that the paper has length of one unit, without measuring can you determine the perimeter and area of the pinwheel, and the volume and surface area of the box? 
I could honestly tell them: I did not know the answers, so they would have to explain to me how they found the results.

Opening up the finished models to reveal the pattern of folds provided a good strategy for getting to the answers. Considering how the folds divided the paper (into sixteen squares) and using the Pythagorean Theorem to calculate the lengths of diagonal folds allows you to get all the lengths you need.


The multiform pinwheel has a crease pattern like this:

And the masu box has the following crease pattern:


When it came time for the answers to the math problems I had posed, I had a mild surprise: two of the quantities that I had asked for came out to the same value - the area of the pinwheel and the outside surface area of the box were identical (3/8 units - interestingly just under half of the paper is exposed, the rest is folded in).

Taking another look at the crease patterns, you can see how the image of the box can be transformed into the pinwheel, demonstrating without calculations that the areas are the same: