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 ago...wow 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 dimensions-math.org 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).

Sunday, September 28, 2008

Obey Gravity. It's the Law.

What do you get when you start out with a vertical line of masses and set them in motion around a heavy object?

beauty!



I've been working on allowing screen captures of my programs this week, which I can package into video with the opensource ffmpeg, and I am really liking it.  This Gravitation3D system (admittedly an artificial configuration) is very similar to the one I used to to make the pic on the top of my blog.

Saturday, September 27, 2008

$300 Unicycle Trumps $60000 Lotus

This happened a while ago, but the story recently came up in conversation and is maybe worth a funny share. For a long time, there was this fancy Lotus dealership just a few blocks down the street from where I work. These cars are pretty wild looking and come in some crazy colors...definitely eye turners.


On one particular morning when I was peddling into work on my unicycle, I had the serendipity to ride past one of these Loti driving down the street in the opposite direction. And I wish I could have videotaped the slowed driving and jaw dropped, head following reaction of the driver as we cruised on by each other. I'm telling you (somewhat seriously)...if you're having a midlife crisis and want people to look at you, meet that need for 0.5% of the cost of the traditional approach by learning to ride a unicycle!

Anyway, my friend Aj has a yearly ride in San Antonio for his birthday. Last year there were 11 riders, but last Sunday we reached critical mass with 18. I like riding in the big groups because I'm not much of a ham, so it feels like I'm getting to ride incognito for a change. It seems the only good camouflage for a unicyclist is more unicyclists. Here are some photos from the ride...


Thursday, September 18, 2008

Small Talk

I really like riding the bus to work because it is my time to read. Sometimes though there are forces at work conspiring to steal these precious moments from me. For some reason, a number of bus travelers looooove to hear themselves talk, and even after a year of bus riding I haven't yet mastered the fine art of evading this with advanced techniques such as using ear buds or avoiding eye contact. Yesterday, I found myself daydreaming about other approaches, even extreme ones like feigning deafness, while my morning commute was usurped by a nice, but chatty man who talked to me ("to" is deliberate here, as to be distinguished from "with"). I got on the bus with another 4x4x4 cube for Colby (the first sadly has been disassembled and irreversibly mixed with food, but that is another story), and with this ice breaker the "conversation" began...

Nice, Chatty Man: "Oh, a Rubik's cube! I used to be able to solve those."

Me: "Cool, this one is for my nephew Colby."

Nice, Chatty Man: Proceeds to talk uninterrupted for 25 minutes with absolutely no peep from me as I longingly make glances at my book - I'm in no way exaggerating. Rubik led to speed solving, to games in general, to ping pong, to his forte: billiards. There's straight pool, snooker, a rotation game, 9-ball, some variant using 2 cue balls (one having a red dot), big and little tables and pockets, english and masse shots. He had what he called a "senior moment" at one point trying to remember the rules of one of the multitude of games he was describing to me, and pointed out this happens to everybody. Gambling came up, and the high-rollers he's played with. Snooker is actually named after a fish, which has really sharp teeth and hence requires one to use steel lead lines when fishing. There was in fact extended explanation of fishing, though I can't recall the details (it happens to everybody), with occasional reversals in the exposition back to pool again. Jackie Gleason made a cameo in this story and he described their meeting and how Jackie offered him Dom Perignon while they played (aside: nice, chatty man has actually had many tens of gallons of this fine sparkling wine over the course of his lifetime). A random glance out the window and a '65 something or other caught his attention, so we were off to the world of cars, 352s, hemys and chevys, oh my..........

Me: "Well, this is my stop, seeya."

Nice, Chatty Man: "Very nice talking with you. Bye."

Truly he had a dizzying intellect. I feel guilty for feeling a bit miserable during this experience and in retrospect, maybe I should have just tried to help get this guy setup to do some blogging.  After all, I didn't know snooker was both a game and a fish, nor what a masse shot was called.  But I can't even begin to decide how to tag this one.