I do math

13 July, 2015

Well, maybe not really complicated math. Or maths, depending on where you come from.

It’s like this. I recently discovered 3d printing. Yay! My thinginverse page is here. Saw a thing by a dude doing a loxodromic lampshade and I am like “man, I am all over that shit like stink on vomit!”

So I decided to do a better one. Mainly because what I really want to do is a quasifuchsian curlicue lampshade.

So. I need to write a 3-d bilinear transform that moves the xy plane onto the unit sphere.

Any bilinear transform can be done using two sphere inversions, which are easy-peasy.

So, what pair of sphere inversions do the thingy that I want?

Well, we need more invariants. I want the unit circle to be constant. I want all points on the xy plane to be moved to the unit sphere. I want the z<0 half-plane to be moved to the exterior of the sphere.

Now, for some math(s).

I think it’s pretty obvious that the two inversion spheres will be centered on the xy=0 axis. This means that I only have four numbers to figure out. In fact, I can just work with one slice of the space and just do it as a 2-d operation, which makes visualising it muuuch easier.

Three points is enough to fully specify a mobius transform, and I have three points here:
[1,0,0]->[1,0,0]; [0,0,0]->[0,0,1]; ∞->[0,0,-1].

But I don’t want to do this as a mobius transform … although it would be a hell of a lot easier if I did. No! I will stick to the original plan. A pair of sphere inversions. Because you can do arbitrary stuff with it, that’s why.

So, what two inversions accomplish my little plan?

lets call our spheres (circles) Γ1=[0,0,c1]*r1 and Γ2=[0,0,c2]*r2. I invert the point *first* in Γ2 and *then* in Γ1. IOW, p’ = Γ1(Γ2(p)) .

To do a cirlce inversion, you move the center of the circle to the origin, scale the radius to 1, invert, and then move things back again. Inversion is a matter of dividing the coordinates by the square of the distance, which is easy to get

the halfway point is [ x/r, (z-c)/r].
the distance squared of that halfway point is (x/r)^2 + ((z-c)/r)^2 , which is (x^2+(z-c)^2)/r^2

so invertiing we get
[ x/r / ((x^2+(z-c)^2)/r^2), ((z-c)/r)/((x^2+(z-c)^2)/r^2)]

[ x / ((x^2+(z-c)^2)/r), ((z-c))/((x^2+(z-c)^2)/r)]

[ rx / (x^2+(z-c)^2), (r(z-c))/(x^2+(z-c)^2)]
and then move everything back

[ r^2 x / (x^2+(z-c)^2), (r^2 (z-c))/(x^2+(z-c)^2) + c]

so the effect of Γ2 is

[ r2^2 x / (x^2+(z-c2)^2), (r2^2 (z-c2))/(x^2+(z-c2)^2) + c2]

and the effect of Γ1 Γ2 is

ooh-kay. Let’s just do that common term first

K = ({r2^2 x / (x^2+(z-c2)^2)}^2+({(r2^2 (z-c2))/(x^2+(z-c2)^2) + c2}-c1)^2)

giving us

[ r1^2 x / K, (r1^2 (z-c1))/K + c1]

Now, the only way (sorta) this can map the point at infinity to [0,-1] is if K is infinite for [∞,0] and c1 = -1.

So that’s one of our constants sorted. Yay! Let’s substitute it in:

K = ({r2^2 x / (x^2+(z-c2)^2)}^2+({(r2^2 (z-c2))/(x^2+(z-c2)^2) + c2}+1)^2)

Γ1 Γ2 [x, z] = [ r1^2 x / K, (r1^2 (z+1))/K – 1]

Now, what’s going to make K infinite for [∞,0] ? Well, (x^2+(z-c2)^2) needs to be zero. That ain’t going to happen. But that x^2 term in the bottom means that … have we got an infinite radius for one of the circles?? That’s … possible. In fact, inverting the

got it.

If you invert the xy plane through a with radius 2 that is tangent to the origin, this moves the xy plane onto a unit circle centered at .5. Problem is, it’s inverted because it has only been throug one reflection. So invert it through [0,0,-2],r=2, and then reflect the z coordinate at -.25 (or just reflect z and subtract 1). The problem with *that* is that you can’t express it as a pair of sphere inversions if you paramterise it the way I have been doing.

But you know what? Screw it. I only want one specific job done, so I’ll do that.

Thanks guys!