## Reflecting Triangles, live

A while back I made some movies which began with a triangle in the plane, reflected that triangle through its three sides, reflected those triangles through their sides, and so forth. The interesting result is that for only four shapes of triangles, the resulting set of triangle vertices is discrete.

Using Raphael and a plane geometry package that I wrote, I quickly redid this visualization in Javascript; you can now move the vertices around to see the effect on the reflected triangles.

## Culturomics

I have really fallen in love with Google Books Ngram Viewer, so I thought I’d do a little “culturomics” myself. Here’s an image I made using Google’s data:

The brightness of the pixel at position $(x,y)$ is related to how frequently “$x$” appears in books published in the year $y$. Specifically, if $p$ is the number of times “$x$” appears in print during year $y$, divided by the number of times any number less than 2100 appears in print during that year, then $(1 - p)^{1500}$ is the brightness of the pixel at $(x,y)$.

The dark, diagonal edge along the right hand side appears because in year $y$ there are many published appearances of numbers near $y$.

World events have left their mark on the numbers appearing in books! For example, 1914 is still being talked about long after 1914, as evidenced by the darker line above 1914.

If we look at numbers just above 1000 and turn up the contrast a bit,

we see an echo of the dark diagonal, from people writing (or more likely, the OCR software reading) zero instead of nine in the year. There’s a dark column for the Norman conquest in 1066; a number like $2^{10} = 1024$ was not so important until the 20th century.

If we look at numbers just above 1300,

we can see an diagonal line from 1800s being read as 1300s, and a dark vertical line above 1453 (the “end” of the middle ages). In the 18th century,

1776 is quite visible. And finally, a puzzle:

Why was “2044” so significant until the 1920s?

I’d love to know the answer to this question. The only thing I can guess that might relate the year 1919 to the year 2044 is solar eclipses.

## Many more Lights Out

A very long while ago I posted some solutions to Lights Out; back then, I solved the $n$-by-$n$ board by row-reducing an $n^2$-by-$n^2$ matrix.

Since then, both Boris Okun and Brent Werness pointed out to me that I should’ve solved Lights Out by using a scanning algorithm: propagating the button presses down one row at a time, and exponentiating the propagation matrix to make sure that I don’t get stuck at the last row.

This is much faster.

With this method, here is a (scaled down, auto-leveled) 2000-by-2000 solution:

And here is a (very much scaled-down, auto-leveled) 5000-by-5000 solution:

## Reflecting Triangles

My advisor, Shmuel Weinberger, was teaching Math 113, and asked for some pictures of the following procedure:

• Reflect that triangle across its three sides.
• And repeat, reflecting the resulting triangles through their sides, and so forth.

I made a couple movies of this, illustrating this procedure as you move through the space of triangles. Observe how, for only four shapes of triangles, the resulting set of triangle vertices is discrete.