Some Thoughts about Augmented Reality
February 27th, 2008I made this video quickly, but I still think that it gives a good idea of what is in my head. The first example really could be implemented today with existing technology and a little bit of software to pull it all together.
Pi Calculator
February 24th, 2008Everyone loves π! I was bored today, so obviously I got the urge to make a program to calculate it. (Who doesn’t, right?) A friend of mine has hacked one together in Java, but I feel the need to show him how it’s done in C#. There’s nothing wrong with a little healthy competition after all. Bring it on!
The first challenge was to figure out how to calculate π. I came up with this website. I decided to use “Gregory’s Formula” at the bottom of the page, which is an alternating series.
Here’s what I saw on the website:

So that means that…

and finally…

The last equation is just the calculus version of the first one. In either way the basic pattern is that I start with 1/1, subtract 1/3, add 1/5, and so on. Then at whatever point I want multiply that resulting summation by 4 to get an approximation of π. The fun part is translating that into code.
So what does that look like in code? Well, I made a whole PiCalculator class, but this is the part that runs over and over:

And whenever Pi is requested, it just multiplies aFourh by 4.

That’s the basic idea. There’s more code to initiate the calculation process (and run it on a separate thread), a bunch of accessors so that the main program can get information to display, and finally there’s code to actually display all of the information.
When the program is first opened it looks like this:

It’s calculating π in the background, but for performance sake it only shows the user the values when the “Update” button or enter is pressed.

After 30 seconds it has more pi than any sane person would care about.
One thing I had to look out for was numbers that were too extreme. Eventually that fraction that is being added and subtracted in the summation is going to be rounded to zero, so I account for that in the code, stopping the calculations in that event. As you can see, though, even with my computer’s Intel Core 2 Quad Q660, I would have to run this program for several years to have that happen.
So this was a fun little project. Feel free to try it out for yourself!
Download the C# source code here
Ping from the start menu
February 19th, 2008I accidentally stumbled upon a Vista feature today. It seems that "ping" is a keyword in the Vista start menu, like "control". So if you type "ping 192.168.1.1" it will open up the command prompt ping that computer three times.
![]()
the only trouble is that the window closes right after the third ping, but you get at least enough information to tell if the remote computer is responding.
You can also type in the Windows Network name of the computer.
![]()
And, of course, you can still find "the ping pong song": ![]()
FRI Version 1.0.0.2
February 14th, 2008This version of FRI adds the ability to sort ROMs (ascending or descending) by any of the columns in the main FRI window. It also adds the ability to reload the default Platform and Language Vocabulary values in the event that they get erased or modified. It also changes the target of the help button to http:/mypieceoftheinter.net/projects/fri.
Surf the Web Gangsta-style with Internet Explorer 7
February 13th, 2008I have a 24" monitor hooked up to my computer, and sometimes I like to make a webpage take up the whole screen so that I can lean back and read in comfortably. For this I use Internet Explorer 7’s zooming feature. This isn’t like previous versions where it just changed the size of the text. In IE 7, zooming will actually make the whole page bigger.
As an example I will use a comic from xkcd. Here’s what it looks like normally: ![]()
That’s fine, but the comic itself doesn’t even take up a fourth of the screen. There are two ways I can make the page bigger.
The first is to go to the zoom button in the bottom right corner of the window. Clicking on the button rotates between 100%, 125%, and 150%. Clicking the down-arrow next to the button gives more options. (FYI, that "e" icon next to it is IE7Pro.) 
My preferred method is to hold control and then use the scroll-wheel on the mouse to zoom. Scrolling up (moving the tip of your finger away from you) zooms in, and the opposite zooms out. (Clicking on the zoom button after using this method brings the webpage back to normal size.)
![]()
Here’s that same page, zoomed in so the comic fills the window:
Using the ctrl+scroll method, IE supports scaling a page up to 10,000% Here’s Google.com scaled to that degree: ![]()
IE 7’s zooming features was especially helpful before YouTube had a full-screen option, but it’s still helpful for emended flash videos on other websites that don’t have a full-screen option.
Of course, this feature is also handy if you have poor vision, but I like it too, because maxin is easier leaning back in my chair.
Next Page »
