Saturday 27 July 2013

Playing Tetris is my homework!

Tetris

One summer when I was younger, twelve or so, I was sent to a summer school for the insufferably gifted. I really didn't want to go so I refused to pick a class, which was a terrible idea. In the end I was sent to learn computer programming, something I never would have chosen, since I liked video games. Being denied a summer of watching daytime TV and playing Street Fighter was an outrage and in protest I slept through most of the classes.

There was a final project that we had to do, based on what we learned during the course. People did very simple things like programming a computer to deal blackjack or do a substitution cypher. Things like that. But one kid, and I wonder what happened to him, made a Tetris program. This blew my mind. So, almost 15 years late, I am handing in my homework. I promise I didn't copy off anyone.

Click the left hand screen to begin playing. The left and right arrow keys move the blocks, down arrow slams them. The 's' and 'd' keys rotate the blocks. The 'p' key pauses and unpauses it. If you die click the left screen again to restart. Tetris is such a classic it can hardly be improved, however if you want to try something funny click on the box that says "Fixed" and try playing Tetorus.

Saturday 20 July 2013

The Doodle of Arthur

I think there's a lot in a name, probably because I happen to have an unusual one. Maths seems to yield topics and titles that for some reason always sound interesting to me. A random sample of some recent papers, about which I have no idea: "Non-Abelian Lie algebroids over jet spaces", "The Voevodsky motive of a rank one semiabelian variety", "On Avoiding Sufficiently Long Abelian Squares" using three different versions of Abel's name. Are there jet planes in a jet space? What was Voevodsky's motive; probably not fame. Do short Abelian squares make better company?

Some things I do understand which also have great names are the "classic" curves. I think the Quadratrix of Hippias sounds great and I want one to ride around on. Compared to its name it is a sightly disappointing shape. You can use it for trisecting angles and squaring cubes, but since it can't be constructed with ruler and compass it doesn't count as a solution, mathematicians are very picky. Hippias was, according to Plato, vain and boastful. Which goes to show, if you are vain and boastful, invent something useful so people will still be talking about you two and a half thousand years later but write your own biography or people will still mention how vain and boastful you are.

The Conchoid of Nicomedes takes its name from another Greek, who seems to have left only this to the world with no record of how vain and boastful he was. The word conchoid is supposed to recall a conch shell, the idea being that if you stack a lot of these they look something like the patterns on a mussel. Archimedes and his spiral are very famous compared to the other two but despite writing a whole book about them they were first studied by Conon (the barbarian). Often priority is not enough to get your name attached to something, even if then Spiral of Conon sounds better.

The second row are all examples of a family of Conchoids called Conchoids of de Sluze, named after a famous Belgian. The word Cissoid means ivy-like which it isn't. Strophoid means belt with a twist which is a strange thing to have a single word for. Trisectrix is the feminine curve that divides an angle in three, much like the Quadratrix of Hippias but a little more complicated.

The Witch of Agnesi is called a Lorentzian by physicists. Why it's called a Witch is apparently a (hilarious) pun in Latin and probably stuck because Agnesi was a woman and 18$^{th}$ century mathematicians weren't too sensitive to the gender bias in their field. Tschirnhausen, as well as having a very difficult name to spell, invented porcelain in Europe, which is quite a bit more impressive than this funny curve but unfortunately he didn't market himself well enough and someone else's name became attached to the discovery. Bernoulli (all of them) is very famous, the word lemniscate isn't but should be, it means decorated with ribbons.


Quadratrix of Hippias
Conchoid of Nicomedes
Spiral of Archimedes
Cissoid of Dioceles
Strophoid of Newton
Trisectrix of Maclaurin
Witch of Agnesi
Cubic of Tschirnhausen
Lemniscate of Bernoulli

A note on the construction of these for those who are interested (if you are really interested you can right click and view the source and see that I should have defined some more classes and functions to make my life easier when drawing these):

  • Quadratrix of Hippias: Move a line segment down and a radius around a quadrant at a uniform rate so they reach the bottom at the same time. The intersection of radius and line defines the curve.
  • Conchoid of Nicomedes: Draw a line from a point O to a point on a line X and add an extra distance k with the same slope as X varies down the line.
  • Spiral of Archimedes: Starting from zero rotate around the origin and draw a line whose length is proportional to the angle. The end of the line traces out the spiral.
  • Cissoid of Dioceles: Given a point O and a line L draw a line parallel to L through O. Let point on P vary on L and the projection of P onto the line through O be Q. R is the intersection of the line through Q perpendicular to OP and the points R trace the curve.
  • Strophoid of Newton: The position of the orthocentre of a triangle with base given by a radius and the third vertex varying around the circle.
  • Trisectrix of Maclaurin: The intersection points of two lines; one spinning three times as fast as the other.
  • Witch of Agnesi: Draw a line from the base of the circle to the upper line and construct a right triangle with hypotenuse given by the line segment outside the circle, the third vertex traces the curve.
  • Cubic of Tschirnhausen: The negative pedal curve of the parabola (look it up).
  • Lemniscate of Bernoulli: This one is neat. I am using something called Watt's linkage. We stick three rigid rods together: a small one which rotates uniformly around a circle $a$; a longer one fixed at the centre of a different circle $b$ and a final even longer one $c$. We attach one end of $c$ to the free point of $b$ and the midpoint of $c$ to the free end of $a$. As $a$ rotates the free end of $c$ traces the curve!