Wednesday, October 29, 2008

Hyperbolic Tiling in Motion

I've seen a number of pretty images of hyperbolic tessellations (tilings) on the web. A nice gallery from one of the producers of the Dimensions videos turns many flat Escher tilings into hyperbolic ones. What I hadn't seen until I went looking the other day was a way to animate motions of the hyperbolic plane (using the Poincare Disk model).

I thought this would be a cool project, and decided to do a quick search to see what applets out there might already be doing it. I was pleased to find this one right at the top of the search results (and even more pleased because I know the author Don Hatch through the Rubik hypercube group and was able to meet him some time actually that was almost a decade ago...scary).

Drag your mouse around on his applet above to see this tiling of the hyperbolic plane translate (update: Sarah let me know this doesn't work in Google Reader btw). This can give a much better feel than a static picture that each tile in the image is actually the same shape (a regular polygon). I know this post is lacking in background, but hyperbolic geometry can't be represented through normal plane geometry without distortion, hence there are alternate representations with tradeoffs in characteristics. One thing to notice is that the white tiles have 7 sides and the dual blue tiling has 7 triangles meeting around a point, but you can't have such a tiling in normal space with a set of regular triangles (7*60>360). There just isn't enough space, kinda like our closet storage for Sarah's shoes :)

This applet is highly configurable and fun to play with, e.g. click on it and start pressing p. You can find all the info on Don's applet page. There are some extensions I would still like to see in addition to translations. A rotation of the plane about any selected point would be cool. Hyperbolic geometry is more interesting than flat (Euclidean) geometry, leading to more possibilities as well. Specifically there is a special kind of rotation called a limit rotation, and this would also be neat to see. Finally, it would be sweet to allow animated motions of other models of hyperbolic geometry like the half plane model. So there is still fun potential hobby coding to be done (of course).

Tuesday, October 28, 2008

World of Goo

Against one of the stereotypical traits of those practicing my chosen profession, strangely I have never been much of a gamer, at least not since junior high school. In truth, I haven't bought a video game in years, but last weekend I did! (And it wasn't even a racing game.) It is a physics game, but you might never realize it. The art and music are both extremely cool, and there is one song I wish I had in my iTunes library. Here is a review that will do it more justice than I could.

They have a free demo, which was more than enough for me to want to support these two guys, who are only asking $20 for the full version as well...excellent joy-to-price ratio. The main site is here, which has some nice trailers if you'd like to see more before downloading the demo. Thanks Rob for pointing me to this one :)

Sunday, October 19, 2008

Soap Bubbles

I've been playing around with POV-Ray in the background quite a bit since my first post about it. I spent a lot of evening hours hanging out with Sarah in front of the tv working on a soap bubble effect (I had no idea this would turn into the diversion it did), and I wanted to share my best effort on it so far :)

It took some obsessiveness to get this far. Sarah was helpful, and after a number of iterations I'm sure she tired of being shown sets of two ever-so-slightly-different pictures to choose the best one. Luckily she humors me.

I want to share a little more about this picture because I wasn't thinking about rendering soap bubbles at all when starting it. That really was just a diversion. I am interested in projections from 4D to 3D of the hypersphere (the four dimensional mathematical analogue of a familiar sphere) because I am trying to understand that object better. Just like a sphere in 3D, this is the set of points that is a fixed distance from a center point, only in a higher space. (I feel the need to give some background - an ordinary sphere is a surface of dimension 2 that lives in 3 dimensions.  A hypersphere is a 3 dimensional object, and mathematicians call these the 2-sphere and 3-sphere, respectively - the names can lead to confusion because in an everyday sense most think of a sphere as a 3D object rather than a 2D one.  Spheres don't even have to be embedded in a higher dimensional space, but that is a digression here.)

I'm going to continue to blab a bit, but stay with me (or just skim this paragraph) because the most interesting part I want to share is at the end of this post...  We can't stereographically project every point of the hypersphere from 4D down to 3D (the resulting set of points would cover all of 3D space plus one more point at infinity, and hence the full projection doesn't help my unfailing need to see pictures of things to understand them). So we try to do the best we can by looking at discrete subsets of points (and lines, and surfaces) of the hypersphere. The picture above is one such subset, a regular tiling of the hypersphere called an 8-cell, and is more commonly known as the hypercube. This is one way of representing the hypercube anyway, which involves first stretching the edges of the 4D cube outwards so they lie on the hypersphere (causing them to be curved), then stereographically projecting that from 4D to 3D. I'll (hopefully) explain more about stereographic projection when I share a short animation I've been working on in POV-Ray (if you're too excited to hold your breath for that, check out for some excellent and free downloadable videos. I recommend those regardless!!).  Some more cool properties about the picture above... All the edges are "great circles" of the hypersphere, and all the bubble surfaces are "great spheres" of the hypersphere. Stereographic projection preserves circles and spheres, meaning a shape that is a circle in 4-space before the projection is still a circle after the projection. How cool is that? (Before you go on an extrapolation binge like I always do, know that the centers of the circles and spheres are not preserved during projection though, i.e. the center of a projected circle is not the projection of the center of the corresponding unprojected circle.  Peter piper picked a peck of pickled peppers.)

No worries if the above didn't make too much sense, but let me share something really astonishing about all this. Amazingly, you can make the shape of a hypercube like this picture in our real 3D universe with real bubbles because of the way bubbles try to minimize their surface area! Here is a youtube video showing a bubble performer make a "square bubble". But taking the above into consideration, the performance is really is much more spectacular than a square bubble. Using only bubbles, he's effectively projected a 4D object (a regular polychoron) for us to see and admire! This is truly magical and a nice example of the unreasonable effectiveness of mathematics in describing our physical universe.

We can theoretically "project" more complicated tilings of the hypersphere using bubbles as well. Though I don't imagine a bubble magician could pull this one off, here is a computer rendering of the 120-cell in bubbles.

Couple all this with Sarah discovering it is tons of fun to blow bubbles off our balcony, and there are smiles all around :)

(btw, sorry for all the parentheses (I can't seem to help myself (it's what I do)))

Saturday, October 18, 2008

Between the Folds

Sarah and I watched a neat documentary blending art and mathematics on Thursday night. There are many interesting and endearing characters in this story, and we both really liked it. It is an hour long and you can watch it online, but only this weekend as part of the Hamptons International Film Festival. If you don't catch it there, I recommend bookmarking the film site so you can see it at some point (they have a trailer at that link btw).