Category Archives: General

Johan reports Ohio Rocket Launch

Johan, ON5EX, reported that he had detected a rocket launch on the Ohio grabber. He gave the following screenshot:

rocketlaunch-small

Scanning back through my own records, I see that I detected the same launch!

rocketlaunch

I wish the brave astronauts on WA5DJJ good luck.

Addendum: Okay, it’s just a bit of thermal drift. As his transmitter warms up, it drifts down in frequency a bit. Still, looks pretty dramatic when you are talking about a 100hz wide band.

Code for counting checkers positions…

A year ago today, I blogged that Tom Duff had shown me Russell Cox’s blog. I hadn’t kept up with it, so I went over there and found this interesting article on a nifty problem in combinatorics. I solved a somewhat similar problem (counting the precise number of possible checkers positions) but sadly, I couldn’t find my code to do it. So, I reimplemented it. Here it is. I only used the most obvious optimizations that Cox illustrates in his example: I bet that I could do a lot better if I thought this through.

#!/usr/bin/env python

import locale

d = { }

def fact(n):
    if n == 0:
        return 1 
    else:
        return n*fact(n-1)

def comb(a, b):
        return fact(a) / (fact(b)*fact(a-b))

def num(bk, wk, bm, wm, f):
    s = (bk, wk, bm, wm, f)
    if d.has_key(s):
        return d[s]
    else:
        val = comb(4, f) * comb(24, bm-f) * comb(28-(bm-f), wm) * comb(32-bm-wm, bk) * comb(32-bm-wm-bk, wk)
        d[s] = val
        return val

total = { }

for n in range(1, 24+1):
    for bm in range(0, min(n, 12)+1):
        for bk in range(0, min(n, 12)-bm+1):
            for wm in range(0, min(n-bm-bk, 12)+1):
                for wk in range(0, min(n-bm-bk, 12)-wm+1):
                    for f in range(0, min(bm, 4)+1):
                        val = num(bk, wk, bm, wm, f)
                        total[n] = total.get(n, 0) + val

locale.setlocale(locale.LC_ALL, "en_US")
mxlen = 0
for n in range(1, 25):
        mxlen = max(mxlen, len(locale.format("%d", (total[n]-1) - (total.get(n-1, 1) - 1), True)))

print '-' * (mxlen + 3)

for n in range(1, 25):
        print "%2d" % n, locale.format("%d", (total[n]-1) - (total.get(n-1, 1) - 1), True).rjust(mxlen)

print '-' * (mxlen + 3)

print "  ",locale.format("%d", (total[24]-1), True)

Here’s the output:

------------------------------
 1                         120
 2                       6,972
 3                     261,224
 4                   7,092,774
 5                 148,688,232
 6               2,503,611,964
 7              34,779,531,480
 8             406,309,208,481
 9           4,048,627,642,976
10          34,778,882,769,216
11         259,669,578,902,016
12       1,695,618,078,654,976
13       9,726,900,031,328,256
14      49,134,911,067,979,776
15     218,511,510,918,189,056
16     852,888,183,557,922,816
17   2,905,162,728,973,680,640
18   8,568,043,414,939,516,928
19  21,661,954,506,100,113,408
20  46,352,957,062,510,379,008
21  82,459,728,874,435,248,128
22 118,435,747,136,817,856,512
23 129,406,908,049,181,900,800
24  90,072,726,844,888,186,880
------------------------------
   500,995,484,682,338,672,639

Addendum: It’s actually a tad subtle to determine why caching works so well in this program. I’ll have to think about it some more.

Addendum2: I actually wasn’t entirely precise before. Strictly speaking, these aren’t all valid checkers positions, since obviously some of them cannot be reached from the starting position for the game.

Superbowl ads / Chuck in 3D

I imagine that millions of Americans were watching the Superbowl this weekend, and saw the trailer for Dreamworks Monsters vs. Aliens that was broadcast in 3D. Hopefully some small subset of you actually had the glasses that you needed to view the 3D images. I was a bit curious about the technology involved, so I did a bit of digging to find the patents (yes, the 3D method is patented), and thought I’d share what I discovered.

Here’s the patent:

Method for recording and viewing stereoscopic images in color using multichrome filters

And here is the most interesting figure from the patent, showing the transparency at each wavelength for the filters which cover both eyes.

Text not available
Method for recording and viewing stereoscopic images in color using multichrome filters Svend Erik Borre Sorensen et al

You’ll notice that the right eye only passes light centered around 450 nm or so, which is essentially a very deep blue. By 500nm, the filter is passing very little light, and only begins to peak back up above 700nm (which is in the invisible part of the infrared). The other eye passes virtually none of this deep blue, but actually passes relatively little of any color: it’s maximum transparency is only about 20% or so in the visible spectrum. A moment’s thought on my part tells me that this is probably by necessity: if one eye perceived a much higher luminance than the other, then all sorts of ghosting and the like occur, and it’s very unpleasant to watch. Since your eye is relatively insensitive to blue light, you need to knock down all the rest of the colors pretty sharply to keep this kind of luminance clash from happening.

So here’s the thing: the net result is that the image that you view through these glasses is dim. Really dim. Which is at least part of why I found it so hard to watch. While this method does give a surprisingly good impression of color, it’s like watching your television through a pair of sunglasses. If you are like most people, you probably have the brightness of your television set really high, because you actually like that look. Trading a nice looking 2D image for a dimmer 3D one that is hard to watch doesn’t seem like a good tradeoff to me.

But here is the real thing: none of this has anything to do with the movies that you see in stereo theaters! The 3D they use is an entirely different system which uses polarized glasses. These allow both eyes to receive full color images. Because they both receive the same color spectrum, there is virtually no luminance mismatch. The net result: your eyes feel much more comfortable. The experience is a lot better. The image (while dimmer than regular projection) is much brighter than the ColorCode 3D system.

And, so finally, we get to the real real thing: if you hated the 3D you saw in the Superbowl, don’t give up on 3D movies! What you see in the theater will be a totally different and much more pleasing experience than you likely saw on TV.

Addendum:: Talk of the Nation had an interesting podcast where they interviewed Jay Ankeney about 3D and the Superbowl. He asks an interesting question: how does showing 3D which is actually pretty bad (ColorCode) actually promote 3D which actually works pretty well (ReelD in digital theaters)?

free university lectures on lecturefox

I must admit: I’m separated by 20 years from my college experience, and I still miss it. Not the parties, being single, or even being young, but simply the challenge and excitement of being in an evironment where you are encouraged to learn about interesting topics. I love academia. I like being in the classroom. I like lectures. Heck, I even like doing homework and testing my understanding with tests.

Well, I may not be able to go back to college, but at least the Internet provides a wide variety of material available, much of it from schools much better than the one I atteded. Check out lecturefox.com’s collection of free university lectures. They have lectures on physics, chemistry, computer science and mathematics. Awesome.

Back to work…

Well, after a little over two weeks of vacation (which seemed a lot longer to me) it’s finally time to take a shower, put on some clean clothes and get to work again. Hope everyone enjoyed their holiday. For me and my team, it’s time to finish a movie!

Scrappy

My little feline buddy Scrappy was a feral cat that we’ve adopted. A while ago, we found out he tested positive for FIV, so we decided his days of being a part time inside/part time outside cat were over, and he’s been imprisoned in our house. He seems to have adapted well. Here’s a picture of the little rascal. Feel free to turn it into a LOLcat.

img_0418

I was bored today, so I aimed my Canon SD1100 at him taking a nap, and took this time lapse video (about six minutes long, and about 90 minutes real time):

I guess since I’m posting video of my cat to this blog, it’s a sign that maybe it’s time my vacation ended and I got back to work.

Gutenberg Gem: Scientific American Supplement, No. 647, May 26, 1888 by Various – Project Gutenberg

12I admit to a fascination with Scientific American. I used to have a couple of decades of the magazine which I kept mostly for the Mathematical Games and Amateur Scientist column. Project Gutenberg has begun to digitize some of the 19th century copies, which are mostly of historical interest, but still can be interesting. For instance, the following issue:

Scientific American Supplement, No. 647, May 26, 1888 by Various – Project Gutenberg.

contains an interesting article by James Wimshurst on static electricity generating machines.

Never seen one? Check out:


httpv://www.youtube.com/watch?v=dfgpoRmQUN0

Happy New Year!

Well, 2008 had its moments, but I’m glad to kiss it goodbye. 2009, bring it on!

Tonight Carmen and I decided to stay in and cook: we made some New York steaks, some spinach salad with smoked salmon, and a ratatouille topped with puff pastry. Basically using some of the skills we acquired at our recent cooking class, and it worked out really good. I’m currently stuffed, and watching some movies.

I wish all my readers the best in the New Year!

Randy Pausch’s Last Lecture

Thanks to KE9V for pointing me at this lecture by Randy Pausch:


httpvh://www.youtube.com/watch?v=ji5_MqicxSo

I don’t know what rock I’ve been living under, but it’s a fabulous lecture. You can read more about Randy here. As the New Year approaches and some of us might be making resolutions, it’s definitely worth watching.

Dog Eating Burrito

Okay, I mostly don’t post pet videos on this blog, but sometimes, you just have to make an exception, like when someone decides to give a bean burrito to his dog.


Okay, you don’t really need to make an exception. But I did. What can I say, for some reason I never posted anything on Dec 29 before, so I need to do something.

Addendum: Yes, the title was supposed to bring up images similar to “man eating lion” or “woman eating cabbage”.

OpenStreetMap

I’m interested in mapping and in open source, so it’s interesting to see projects which combine both. Such is OpenStreetMap, a project which not only produces software to use maps, but also relies upon user data to create maps that can be used freely. I heard about this a while ago, but today it came to my attention again, and I must admit: the data looks pretty good! Check out this map of the bay area:

Addendum: The map above just links to some tiles that are mantained on the OpenStreetMap website, and rendered by Mapnik, which is a toolkit for rendering maps. If you wanted to, you could render many different style maps using Mapnik: check out their documentation.

Addendum2: Tim O’Reilly wrote up some more about it.