Better the devil you know

I’m intentionally being the devil’s advocate here, but what the hell:

Obama proposes Indefinite Preventive Detention without Trial.

Or, in the slightly more poetic BoingBoing: Obama promises to suspend Habeas Corpus (long discussion here).

Granted, he is talking about what to do with the ex-Guantanamo-Bayers. It is a tricky situation. What you reap, is what you sow, etcetera. But it is curious how he mixes references to law, the Consitution and doing away with illegality and ad-hoc decisions, and instead suggests replacing them with a system that will effectively be beyond the law.

And of course, no mention is made of restricting this new “law system” only to Gauntanamo Bay and its residents…

peace out

You must vaccinate

Charl does such a good job of explaining this, I will simply point you to his blog: You must vaccinate

Go and read it now, if you have any doubts about this.

When you come back, and in case you have any more questions, here are my Guidelines to World Domination for Dummies:

  1. Pay money to unscrupulous researcher to produce a paper showing that XXX is going to (a) kill/maim/destroy (b) us/the earth/the economy/our children.
    Note: the more vague and speculatory the paper, the better!
  2. Make sure the media gets hold of it.
  3. Profit! *

You get bonus points if XXX is something that we have been doing for ages, and has a good side to it too. Also, bonus if there is nothing that we can really do about it.
That makes it seem even more certain to actually exist and be EVIL!

* Please note that even though Profit! may only be the satisfaction of seeing stupid celebrities take up “the cause” and their idiot fans following them to their doom, for some human-looking predators this is all the reward that they will ever need.

However, in most cases Profit! always means that someone is making Money!
You can dead be sure of that.

peace out

Blogged with the Flock Browser

IFS Drives and Windows installer errors

So you’ve got a little ext3 partition that you set up to share files between a Windows partition and a Linux partition. Then one day, while working in Windows, you decide to install say, Microsoft Visual C++ 2008 Express Edition with SP1 Setup. I know, I know.

Anyways, you run the little vcsetup.exe installer, and lo and behold it does not work. Something about the installer trying to copy a $shtdwn$.req file and failing miserably. Oh, you think, I know: a shutdown is required but is somehow not working, so you reboot and try it again, but it still fails. So you look around on the web, and find all sorts of discussions about IFS Drives and this particular error.

The solution is simple: Open up IFS Drives in the Control Panel, assign None to all the drives that you have mapped, then run the installer. After the installer has finished with its nefarious intentions, reassign the old drive letters to the drives, and you’re done.

You’re welcome, peace out

hacking the plush

Via the Make Blog comes this video about a group of English girls who are introduced to the Arduino, and do some cool stuff with it.

Hold on, you say, given the concepts of

  1. microprocessor
  2. electronics,
  3. programming and
  4. young girls,

which is the odd one out?

However, the video shows the girls getting started, from scratch, with a basic introduction of what is possible with the Arduino, to developing an idea (or scenario, as they call it) which they would like to build themselves, to learning all the ins and outs of the construction, and in the end even getting to grips with programming, and ending up with a completed project!

For those of you who don’t know, the Arduino is a physical computing platform (which basically means a microprocessor that sits between your computer and an electronic circuit that you design). The magic of the platform lies in its low cost and the ease with which you can create interactive electronic projects ranging from the very simple to the amazingly complex.

This just goes to show how accessible electronics have become, and I hope we see more of this kind of thing in the future.

peace out

ray tracing is *hard*

I have forgotten how hard.

The first time I got wind of ray tracing in computer graphics was when I was scouring the shelves of a computer book store at the annual Computer Faire in Johannesburg. This must have been in something like 1992, or 93. The book in question was Photorealistic Ray Tracing in C, by Christopher Watkins, and it included the most amazing samples of images produced using ray tracing, it explained how it worked, and even included two 3.5″ floppy disks (we called ’em stiffies, go figure) with the example source code and everything.

Mind you, at that stage I was still wrapping my head around Pascal, and had null experience with C, so all I did was read, look and think.

So in the past week I started getting interested in building a ray tracer again, so I figured I’d start from scratch. It is not necessary to completely reinvent the wheel – thanks to the internet – because all the info is out there. The problem is that the only place where it is all available in one place is in the source code of the numerous open-source tracers. Many of them also have feature sets that go beyond mere ray tracing, and include things such as stochastic ray tracing, path tracing, photon mapping, bidirectional tracing, Monte-Carlo tracing and esoteric stuff like Metropolis Light Transport and radiosity.

All of which means that to implement the basics, one has to trawl through forums, dig around for papers, and use brute force trial and error. Here then, are some of my initial mistraces:

bug001 - Errors in sphere/ray intersection

bug001 - Errors in sphere/ray intersection

bug001 is a direct result of errors in sphere/ray intersection. Don’t know why it turned out so funky, but it did. It is a feature dammit, not a bug!

bug002 - Reflection works

bug002 - Reflection works

bug002 happened when I got reflection to work properly, with shadows. Not technically a bug. Let’s call it a work in progress.

bug004 - interesting twists

bug004 - interesting twists

This is definitely one of the buggier ones. Mostly because it appears as if I screwed up reflection here, you think. No, I was actually trying to implement refraction. Ha!

At the moment I have both reflection and refraction going, but I am rewriting some of the internals to make it more parallelizable. I also have plans to move port the tracing code to the GPU, via GLSL. Which will be hilarious, given my current dependence on printf-debugging just to make this simple code work…

Current features:

  • ortho and perspective camera models
  • two object types (sphere and plane)
  • one light model (point light source)
  • ambient, diffuse and specular surface
  • shadows (only ambient lighting)
  • reflections and refractions

Of course, I’d like to add all the other stuff too: one man’s feature creep is another man’s late night braingasm.

  • Other primitive types, including “discreet” types like polygons
  • Kd-tree implementation to speed up ray/primitive intersection
  • Anti-aliasing using one of the acceptable methods (more forum trawling/experimenting)
  • Procedural textures (keep your fork, there’s Perlin!)

peace out

flabbergasted, as an aside

I was following a breadcrumb trail today on the subject of the Ray Kurzweil movie Transcendental Man.

On the wikipedia page for Mr. Kurzweil, I read a quote from Douglas Hofstadter who said the following about Kurzweil (and Hans Moravec),

“It’s as if you took a lot of very good food and some dog excrement and blended it all up so that you can’t possibly figure out what’s good or bad. It’s an intimate mixture of rubbish and good ideas, and it’s very hard to disentangle the two, because these are smart people; they’re not stupid.”

I am sorry, but I find that quote as ironic in the extreme. Especially from someone who puts Goedel, Escher and Bach into a blender along with some hokey pokey and hand waving, and then subsequently tries to finger paint a Picasso with the resulting mess.

peace out