The Hobbit Hole

In a hole there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.

10/31/2005

Comments are down

Filed under: General — bilbo @ 11:21 am

I’ve been spammed more than usual lately, and it’s getting out of hand. I’ve had to delete dozens of spams daily for the last couple of weeks. I’ve never been able to get the spam filter on WordPress to work properly. I figure I should upgrade WordPress, and I will do so in the next week or so if given the time. Perhaps then I can figure out why the spam filter isn’t working.

10/21/2005

Meta Matrix

Filed under: Programming — bilbo @ 12:47 pm

Fortunately not a reference to the Matrix within the Matrix movie or some such, I’ve been working on a metaprogrammed matrix math library similar to Blitz++ or MTL, though not so comprehensive.

Why write my own math library? Well, as this is for the book, I felt that using a third party library could complicate licensing issues, so I thought I might as well write my own, and if I’m going to write my own, then I have to learn something from it, which means that I took it as occasion to learn expression templates and metaprogramming more in depth. It’s taken far longer than I would have liked, but how much of that is attributed to complexity versus simple scheduling conflicts (such as work :) ) I can’t say.

The idea is to use the advantages of template metaprogramming to create an efficient, game friendly matrix library with a minimal amount of redundancy.

Game friendly means that it would support common inline notation (whereas MTL requires the use of the function mult to multiply matrices), common operations (dot product, cross product, transpose, inverse), and conversions (euler angles, axis/angle, quaternions, pluecker) only. No eigenvectors or determinants.

The benefit would be improved efficiency. By using metaprogramming techniques, you get generic code for any size matrix rather than redundant code for 1×3, 3×3, 4×4, etc. Also, you can put in generic optimizations as well, such as loop unrolling. Couple that with the compiler’s use of vector math instructions (which most support now) and you can get some pretty fast math code.

If you absolutely must, by using template specialization, you can selectively target optimizations where necessary.

I am finishing up the library with the essentials I need for my game, and then will be writing a paper on it for CodeProject.

If you think of other operations that should be included, let me know.

10/11/2005

Girl Scout Thin Mints Recipe

Filed under: General — bilbo @ 4:28 pm

Girl Scout Thin Mints Recipe exposed! Well, not really. I put this here for my own benefit later really, but you might enjoy it too. Still, it seems like a lot of work for something that I could just buy. Guess I’m just lazy.