Clifford Algebras for Rotating, Scaling, and Translating the Plane June 8th, 2009
Patrick Stein

In my previous post, I reviewed how the complex numbers can be used to represent coordinates in the plane and how, once you’ve done that, complex arithmetic leads naturally to rotations, scalings, and translations of the plane. Today, we’re going to do the same with the Clifford algebra \mathcal{C}\ell_2.

What are Clifford Algebras

In our previous post, we used two different ways to represent coordinates in the plane. We used an ordered pair of real numbers like (3,5) and we used the real and imaginary parts of a complex number like 3 + 5i. Another way we could have written the coordinates in the plane is as a vector. Typically, to express a vector, we pick an axis (say, the x-axis) and then pick a second axis perpendicular to it (say, the y-axis). Most physics books would call these \hat{i} and \hat{j}. I am going to use e_1 and e_2 instead so that there is no confusion with i = \sqrt{-1} and because it is a notation that we will continue throughout Clifford algebras. We could then express (3,5) as 3e_1 + 5e_2. Here, e_1 and e_2 are called unit vectors. We assume they have length one so that when we take three of them, we get something with length three (for arbitrary values of three).

Having done that, we can easily multiply any vector by a real number using the normal distributive law: s \cdot \left(xe_1 + ye_2\right) = (sx)e_1 + (sy)e_2. And, we can add vectors just like we added complex numbers: summing like parts. So, (ae_1 + be_2) + (ce_1 + de_2) = (a+c)e_1 + (b+d)e_2. Of course, subtraction goes the same way: (ae_1 + be_2) - (ce_1 + de_2) = (a-c)e_1 + (b-d)e_2.

Read the rest of this entry ⇒

Complex Numbers for Rotating, Translating, and Scaling the Plane June 7th, 2009
Patrick Stein

A good friend of mine recently discovered some of the fun things you can do with complex numbers if you’re using them to represent points in the plane. Yesterday, I re-read a passage by Tony Smith about why one should be interested in Clifford algebras. Tony Smith’s passage included all of the fun one can have with the complex plane and extends it to three, four, five, and more dimensions. I thought, I should segue from the complex numbers in the plane to Clifford algebras to quaternions in 3-space to Clifford algebras again in a series of posts here.

What are Complex Numbers

Say you’re playing around with polynomials. You start playing with the equation z^2 - 1 = 0. WIth a little fiddling, you find this is equivalent to z^2 = 1. Then, you take the square root of both sides to find that z = \pm \sqrt{1} = \pm 1. We started with a polynomial equation in one variable in which the highest exponent was two and we found two answers.

Pounding your chest and sounding your barbaric yawp, you move on to z^2 + 1 = 0. This should be easy, right? With the same fiddling, we find z^2 = -1 and then z = \pm \sqrt{-1}.

Uh-oh. What do we do now? We can’t think of any number that when multiplied by itself gives us a negative number. If we start with zero, we end with zero. If we multiply a positive number by itself, we get a positive number. If we multiply a negative number by itself, we get a positive number. Again!

Read the rest of this entry ⇒

Why You Should Get A Coding Cap June 5th, 2009
Patrick Stein

Way back when I was at Computer Science House I discovered coding caps. We were working on a Virtual Reality project (I told you it was way back, right?). While we were working, a company called Virtuality made a stop at R.I.T. as part of a larger tour of campuses showing off their VR game.

Guess Jeans was one of the sponsors of their tour. All of us working on the VR project ended up with black baseball-ish caps that said Guess across the front. We wore those caps all of the time we were coding.

Lately, I’ve been having trouble focusing on coding when I am gifted with some moments to spare. I thought, How about I get a coding cap? I tried this about a year ago when I was having similar trouble. The cap didn’t really work then. The cap would itch after a few hours, and before that, I would forget I was wearing it. Once you start reading email and answering the phone in your coding cap, it loses its power.

So, today, I set out looking for a new coding cap… one that I could wear for a few hours, but one that I would notice I was wearing. I tried on a few hats. None of them felt powerful enough. They didn’t have the coding cap magic.

I grabbed a pair of lace-up, fishnet, fingerless gloves. I plan to leave one by my keyboard and the other in my purse. When it’s coding time, I’ll slip one on.

So far, they seem to work. When I reach to check email, I immediately notice my glove and stop. When the phone rings, I peek at the caller-id and decide whether it’s worth it to remove the glove. Sorry, Out of Area: I’m coding right now, and I don’t want to have to take off my glove to hear about the great things you can do for my windshield/interest-rates/auto-warranty/credit-card-processing.

Do you have a coding cap? specific lighting? specific music?

Installing mpich2 for use with CL-MPI June 5th, 2009
Patrick Stein

Some time back, I began writing some OpenMPI wrappers for Lisp. I got everything that I needed working, but I hardly scratched the surface of what MPI-2 makes available.

Recently, Alex Fukunaga started up a blog about Lisp. One of the things he has done is make CFFI bindings for mpich2. Here is an introductory post about those bindings with a link to his CL-MPI site.

Today, I have been working on getting his bindings up and running under Ubuntu Linux and Mac OS X.

Read the rest of this entry ⇒

Study with Me — Maybe Relation Algebras? June 4th, 2009
Patrick Stein

In an earlier post, I was soliciting recommendations for texts to study since I cannot seem to get Cambridge University Press to respond to me. Paul Reiners suggested (amongst other things) Relation Algebras by Games by Hirsch and Hodkinson.

I went to the Math Library at the U of MN yesterday to look through it. I only had a quick glance since I had my 11-month-old in tow. As I am no longer staff or student at the U, I could not check it out. However, as I have a Hennepin County Library card, I am able to request it via Interlibrary Loan. Soon, I will have a chance to assess it more carefully.

l