Sunday, November 20, 2011

more window patterns in gsp

You'd be right in saying 'hey, these are just a bunch of overlapping squares.' Yes. The only redeeming thing that I can point to is that they are made by following a rule, and the rule is one that is easy to reproduce without using any external measuring device (like a ruler or protractor), only the squares themselves. Think origami: you find midpoints by folding, etc. In this case, GSP is used, but only simple constructions like mid-point finding and segment creating.
The trick is to find a rule that allows you to start with a square and then construct two points that you can base another square on, and then repeat.

These were made from the same window-pattern instructions mentioned here.

Friday, November 11, 2011

A4 window patterns and special triangles

A short while ago I mentioned that A4 paper has nice proportions - it's a silver rectangle, which means that the ratio of its long side to its short side is sqrt(2). Because of their nice proportions, silver rectangles can be used to construct special triangles that we know and love from trigonometry.

One nice way to note the angles in these triangles is to form window patterns based on them - these are shapes made from overlapping pieces of paper that have been rotated according to a rule. The term window pattern comes from William Gibbs - so named because if you put them up in a window, the light shining through the different layers of paper reveals additional patterns and shapes.

Here's one example of the special-triangle-window-pattern process. Start with an A4 or similarly proportioned rectangle, and find the midpoint of one of the shorter sides (by folding the paper, for example).

Now take a second rectangle  the same size, and place it so that one vertex lines up with the midpoint drawn, and the other vertex along the same short side of the second rectangle touches the long side of the first. It's easier to see this in a picture:
By doing this, you've constructed the tricky length of sqrt(3)/2 and built the 30-60-90 (pi/6, pi/3, pi/2) triangle. You can confirm that the angle that you've formed a 60 degree triangle by repeating the process and finding that you come "full circle" after 6 pieces of paper (360/6 = 60).
If you change the first placement a bit so that the second rectangle lies mostly across the interior of the first, you get the pattern at the top of the post.

These are nice patterns, but they don't actually use the special properties of A4 (you could do a similar thing with square or letter paper). A little more complicated placing of one rectangle over the other can allow you to create a right triangle with one leg equal to 1 and the other equal to sqrt(2)-1. This is not one of your "standard" special triangles, but it is special in that it allows you to calculate exact values of certain angles (which angles, we'll find out when we complete our pattern).

Here's what the placement looked like that constructed this triangle. I'm afraid that text instructions for the placement would be just too much for this post - maybe you can figure out how it is done from the diagram :).

If you continue placing the rectangles, you will find that it takes 16 of them to come back to the start, which tells us that our triangle contains an angle of pi/8 or 22.5 degrees - the others are pi/2 (90) and 3pi/8 (67.5).

So.. our new special triangle tells us, for example, that tan(pi/8) is equal to sqrt(2)-1 (what other exact values do we get?).

animated iterations - too much fun

Not much to this post - just playing with the GSP sketch that I pointed to earlier. These are just iterations, plus animation, plus tracing, with what I think are some nice results.

The 'colored Pythagoras tree' fractal below is a classic that I learned in a GSP workshop years ago, and it's based on one of the projects in the free booklet 101 Project Ideas for GSP. I'm sure there are some instructions for the whole thing floating around somewhere. [Update: See the Nov 15th blog post at sine of the times for some instructions on the basic tree.]

The image below is a later stage of the one at the top of the post - an iteration made up of pentagons and curves  - the bottom image shows what the first generation of this iteration looks like.

Saturday, November 5, 2011

some gsp fractal sketches

I found an old GSP file with a bunch geometric fractals in them - I thought that some of them looked nice, so I've posted them here. If you'd like to try them out, you can get the GSP file here - for the most part, they involve pretty standard use of the "iterate" feature.

Animating them in random ways creates some strange looking forms - the same sketch that produces the pentagon fractal above also gives the one below.

The same sketch that gives the snowflake-like pattern at the top of the post gives this odd looking sponge:

Wednesday, November 2, 2011

butterflies, bus transfers, cotangents

Because it is my habit to do paper-folding while using public
transportation, people 
sometimes turn their heads and cast pitying
eyes upon me; but because of my strong 
at these times, their looks do not bother me.

- Kazuo Haga, Origamics

The origami model that I fold most frequently is Nick Robinson's A4 butterfly. You can find this model in Nick's book The Origami Bible (unfortunately I don't think that the instructions are posted on his website). Being in North America, A4 paper is not so easily obtained, but luckily I get handed a little piece of almost-the-same-ratio-as-A4-paper every workday morning in the form of a bus transfer.

Rectangles that have the same proportions as A4 paper have nice geometric properties - they are silver rectangles (named in contrast to golden rectangles), and the niceness of these silver rectangles is due the fact that the ratio of the long side to the short side is sqrt(2). If you don't have an appropriately proportioned bus transfer, or you want to make your own A4-style silver rectangle, Nick Robson provides some helpful instructions here.

Really, you don't need a perfect silver rectangle for the butterfly model - it is pretty forgiving, and tends to work well for bus transfers, ticket stubs, and magazine-subscription inserts (golden rectangles, for example, work too). However, if you look at the simplified crease pattern you can see that the model completely breaks down if the ratio of long to short side is too small or too large. To make things precise, things don't work at all if the ratio of long-side to short-side, r, approaches r = cotan(pi/4) = 1 on the low end, or r = cotan(pi/8) ~= 2.414 on the high end. 
The reason that these ratios are as they are is that the fold that creates the outer edge of the wing has an angle of pi/4 with the midline of the paper, while the fold that creates the inner edge of the wing has an angle of pi/8. If either of these lines hit the corner of the rectangle, the model no longer works. That is why the ratio of long-side to short-side (or in trig-ratio speak, adjacent to opposite) is bounded by the cotan of these angles.

Butterflies attempted with almost-square paper have large bodies and almost no wings, while the long paper produces butterflies that have too-long wings and undersized bodies. Although it seems that the model enforces sharply defined boundaries on the range of paper can be used, finding the size of paper that produces the optimal butterfly is another problem. Are silver-rectangle butterflies the best, golden ones, or maybe ones with r = cotan(3pi/16)? This might be a question of personal origami-aesthetics rather than mathematics.

Thursday, October 20, 2011

tintin - the calculus affair

There is a larger version for printing here - I suggest that you just print the first 4 pages.

Wednesday, October 5, 2011

grade one functions

The function concept is sometimes said to be pervasive in school mathematics  - although it is not until secondary school that it is formally introduced, many elementary school math math activities can be thought of as preparing the way for understanding and working with functions.

However, few students, or teachers, ever make a connection between the functions that they eventually learn about (or teach) in high school and those implicitly encountered in early primary grade activities.

Take for example, the symbol patterns that grade one (and kindergarten) students are often asked to look at, like this one:

Given such a pattern, students are often asked to describe the pattern, continue it, or identify its "core-pattern" or kernel - the repeating unit within the pattern.

How are patterns like this related to functions? Or how do we model such a pattern using functions?

Any sequence of symbols can be thought of as a function from the natural numbers N onto a set of symbols S. You can show this mapping by simply labeling the pattern with N.

So, the pattern can be thought of as a rule f that associates a symbol with each natural number. That's nice, but how can you represent the "rule" that determines which symbols appear where? One way is to return to the core-pattern idea, which reminds us that our pattern is cyclical. In this example, it is a 4-cycle, which you might visualize as a sort of loop among four vertices, or maybe as a clock with 4 positions:

A nice function, sometimes introduced in school math, that maps the natural numbers onto this kind of structure is the modulo k operation. In this case "modulo 4" is what we need: for any natural n, n modulo 4 returns the remainder of n divided by 4, which is always one of the numbers 0, 1, 2, or 3. Modular arithmetic is sometimes called "clock arithmetic" because it is cyclical, and the function "modulo 4" can be visualized as wrapping the number line around a clock with 4 positions on it. So let's say that h is the function that maps N onto the set K={0,1,2,3} following the rule that h(n) = n modulo 4. It's graph looks like this:

Now consider another function g that maps the set K onto the symbols in our set S, it's co-graph looks like this:

The overall pattern can be described as the composition f = hg, and perhaps visualized as a clock labeled with the symbols from the pattern. This shows both the cycle that defines the pattern (the function h) and the arbitrary association of this core-pattern onto particular symbols (the function g), so I think this is a pretty nice way to represent the pattern in terms of functions, but there are other possible descriptions.

So what's the point?

Well, it's fun to do this sort of thing isn't it?

I think it is worthwhile thinking about why we don't often look back and apply the language of functions to early (very early!) math. This may be in part because, as described in the Common Core Standards, "In school mathematics, functions usually have numerical inputs and outputs and are often defined by an algebraic expression." Here we have a non-algebraic function that has a non-numeric output. So, although we do eventually learn about and teach functions in school, they don't tend to be the kinds of functions that lend themselves to talking about the patterns, sortings, colourings, etc. that are encountered in elementary school.

Although this whole thing may seem weird from a school math perspective, it might seem more natural to think of the pattern this way if you are used to thinking like a programmer, and were trying to find a way to generate patterns like this. The pictures in this post, for example, were made in Fathom using the idea of the two functions g and h:

Another thing you might ask: in doing this activity, did we "uncover" the functions that lie behind this simple elementary school patterns, or did we "model" the pattern using functions? I would probably say that we used the language of functions to make some of the underlying structure more apparent. 

Tuesday, September 27, 2011

simple origami and math: traditional envelope

Another very simple origami project that can help spark mathematical conversations is the traditional envelope. Like the other simple origami projects that I've mentioned in previous posts (the jumping frog and the paper cup), the instructions for the envelope are available from the Origami USA diagrams page.

This project is made with letter-sized paper (8.5 by 11 works great, I haven't tried A4), and is an accessible and appealing "practical" project (who doesn't like the idea of folding up a note so that it is its own envelope?).

The crease pattern (at the top of the post) is a great potential source of math-themed conversation. Identifying the types of shapes (the envelope itself is hexagonal - a rectangle with two corners cropped) and finding their area (what is the area of the final envelope compared to the size of the original note paper?) provide some things to explore. Parallel and perpendicular lines, and a few 45 degree angles, make talking about lines and angles in the pattern accessible for younger students.

The pattern is obviously symmetrical, but what kind of symmetry does it have? Many crease patterns that you might look at, like the paper cup (pattern below), have reflective symmetry. The envelope, on the other hand, has rotational symmetry (albiet a simple 180 degree rotational symmetry).

Something else to take note of is the "handedness" of the finished envelope. If you are careful when you follow the instructions, you will end up with an envelope with a front that has its top left and bottom right corners cropped (which is best if you want to affix a stamp to the top right corner).

However, if you are folding the envelope by watching someone else or folding from memory, you are just as likely to end up with its mirror image, an envelope that has its bottom left and top right corners cropped. The envelope, like a many modular origami units (like Sonobe units) has a right-handed and a left-handed version - if you fold a certain way you get one orientation, if you fold another way, you get the mirror-image. Which fold in constructing the envelope determines the orientation of the final model?

Postscript: Some more playing around with this origami model here.

Friday, September 23, 2011

punctured knight's tours

It's pretty clear that a chess knight cannot travel to every square on a 3x3 board. If the knight starts in the center square, it cannot move at all, while if it starts on any other square, it cannot reach the center. If you puncture the board by removing the central square, your dissapointment with the simplicity of the remaining problem might be somewhat relieved by the niceness of the solution: there is only one possible knight tour on a punctured 3 by 3 board (up to rotation, reflection, and change of direction), and it is closed with a nice star-shaped path.

This nice pattern inspired me to look at knight tours on other punctured square boards - boards with odd dimensions that had the central square removed. On boards that are 5 by 5 I could only find two distinct solutions (other non-distinct tours can be found by rotation, reflection, and reversing direction), but it is likely that there are more. Neither of the ones that I found are closed - the first follows a spiral path and always travelling in the same direction (like the 3 by 3 case), while the second starts out as a spiral in one direction and then changes direction after the ninth move.

However, I found that a nice closed tour can be created on a 7 by 7 punctured board by "gluing" together rotated copies of an open 3 by 4 tour. The technique of building up knight tours from smaller ones by gluing them together in a way that the knight can move from one to the next is a common one, and is particularly helpful when you want to create symmetric or semi-magic tours (this is described in Martin Gardner's essay "Knights of the Square Table" from Mathematical Magic Show).

Although this technique does not give you a spiral pattern like the 3 by 3 case or the first 5 by 5 example, the copy and rotate technique gives the path another nice pattern. You can see this symmetry in the 7 by 7 punctured board if you look at the cell values modulo 12 (doing this tracks where the values in the original board are rotated to).

If you connect the values that are equal to each other mod 12, you get a nice pattern of rotated nested squares - this pattern is completely independent of the tour on the initial 4 by 3 board: all it shows is the rotation that was applied to make the larger board. The image below has done this for some values (not all) - for example 5, 17, 29, and 41 form a square, as do 8, 20, 32, and 44.

This pattern is reminiscent of a more ideal version of the same pattern, which can be made using iterations in Geometer's Sketchpad (the gsp file used to create this is here). It seems that one way or another, we end up finding spirals.

You can use the same "rotate and glue" process to create a closed 9 by 9 punctured tour, made up of copies of a specially constructed open 4 by 5 tour. There are several open 4 by 5 tours that can be glued together to make a closed 9 by 9 punctured tour - here's one below:
Here are some previous posts about knight tours:
knight moves
closing time
kixote, or knight tour puzzles
more kixote

Saturday, September 10, 2011


More than any other book that I know of, Theodore Andrea Cook's The Curves of Life shows the extent of our fascination with spirals. First published in 1914, it is an odd blend of 19th-century natural history, amateur mathematics, and art history. On the mathematics of spirals, it is not the best source, Conway and Guy's The Book of Numbers has a better overview on spirals in plants, but it is unmatched as a compendium of all things spiral.

I was thinking about the allure of spirals while I finally got around to attempting some better renderings of spirals from earlier posts. The older pictures in this blog were made with Fathom, which worked well, but these drawn using Processing look a bit nicer I think, and the code is easier to play with.

The spiral below is a quadratic spiral displaying the triangular and hexagonal numbers, originally from this post.

This other spiral is a phyllotaxis spiral like the ones described here. The picture at the top of the post is based on the one below - with edges between points shown instead of the points themselves.

For what it's worth, the Processing code for these and other similar spirals is here. If Processing isn't your thing, you can find Mathematica and Python versions of polygonal-numbers-on-quadratic-spirals at Walking Randomly.

Friday, August 26, 2011

tesseracts and factor lattices

I shall just sit down for a moment and pop on my boots and then I'll be on my way.
Speaking of ways, pet, by the way, there is such a thing as a tesseract.
Mrs. Murry went very white and with one hand reached backward and clutched
her chair for support. Her voice trembled. "What did you say?"
                                         - A Wrinkle In Time,  Madeleine L'Engle

We're likely not as troubled by tesseracts as Mrs Murry, but it is a nice little surprise when you come across them when they're unlooked for. You'll encounter them (or at least their 1-skeletons, the vertices and edges) while drawing factor lattices.

A factor lattice for a number n has as its nodes all factors of n. Two nodes a and b have an arrow (directed edge) between them if a divides b. Usually we don't draw all the arrows, just the ones where b/a is a prime factor of n - all the other arrows are found by composition, or are the trivial arrows that are the loops on each node (a divides a). (In this way, factor lattices are nice examples of very simple and special categories). Some notes on drawing factor lattices are here.

The factor lattice for 1 is just a single node.

The factor lattice for any prime p consists of two nodes, and the only non trivial arrow is one from 1 to p. Sometimes people ask why 1 isn't a prime - this doesn't quite answer the question, but provides an example of how 1 is different than numbers that are prime.

A number like 6, that is the product of two primes gives a factor lattice that looks like a square.

A number like 30 that is the product of three distinct primes produces a factor lattice that looks like a cube.

And 210 is, you guessed it, the smallest number that produces a factor-lattice that looks like a (squished frame of a) tesseract (the 4-dimensional hypercube).

You can go further (of course) but it gets harder to see what's going on in the diagrams. 2310 is the smallest number that gives us a 5-cube.