Archive for July, 2008

Experiments in Ray-Tracing, Part 6: Intersection Tests

I wasn’t going to present quite so much code in this series, but the following intersection tests are (a) tricky to get working correctly and quickly, and (b) they’re not exactly exciting, so I thought I’d include them here as reference. I’ve also been saying things like “if the ray intersects the object…” without covering [...]

Experiments in Ray-Tracing, Part 5: Reflections

Reflections are so easy to implement in a ray-tracer, it’s not suprising that so many ray-traced images contain them. To implement reflectivee surfaces, we need to extend (or composite) our materials to support a reflectivity factor – this ranges from zero (absolutely no reflections) to one (a perfect mirror). Equally, as the reflectivity ranges from [...]

Experiments in Ray-Tracing, Part 4: Lighting

In my last post, I covered the absolute basics of ray-tracing, primary-ray-casting. I showed how to determine which object in the scene each pixel refers to, and hinted at surface colours and shadows. I’m now going to cover lighting in more detail. (Actually, thinking about it, I didn’t go into any detail about how to [...]

Cargo Cult Coding and Abject-Oriented Programming

I stumbled across a really nice article the other day:
Introduction to Abject-Oriented Programming
Judging by the comments posted, only about 50% of people even realize it’s a joke – it’s worth reading through them for a second laugh.
Some notable quotes:
“Programs that use inheritance are characterized by similar blocks of code with small differences appearing throughout the [...]

HTML Editor for ASP.NET AJAX

For our soon-to-be-beta’d new web application, we had a requirement for a rich-text-style editor that would sit nicely within our ASP.NET / AJAX website. I looked at a few, but on the whole getting them to work with ASP.NET was non-trivial. In the end, I went for the Winthusiam Html Editor, and I can definitely [...]

Experiments in Ray-Tracing, Part 3: Basics

Before I start an explanation of the basics of ray-tracing, it’s worth considering how images are formed in the real world.
Imagine taking a photo with a camera. The scene you’re photographing will have one or more light sources (bulbs, the sun, the camera flash). Each light source emits a vast number of photons. Depending on [...]

Experiments in Ray-Tracing, Part 2

Before I get into the meat of my ray-tracing experiment, I need to present a tiny bit of maths so I don’t need to explain in the main articles. I’m not going to try to prove anything here; this is all going to be math-as-technology, not math-as-theory. If you’re happy with operations such as vector [...]

Experiments in Ray-Tracing, Part 1

I was bored the other evening, so I decided to knock together a little ray-tracing application in C#. I’ve always wondered a couple of things about ray-tracing:

How fast can you make a ray-tracer?
How easy is it to code a tracer that produces realistic images?

(You might think it’s a little odd to be trying to write [...]

Ready to Hackificate!

OK, we’re all set up now. By law the first post of any blog must be dull, so here we go.
I’m Stu Smith, a developer in Exmouth, UK. I’m a director of BinaryComponents Ltd, a tiny ISV providing web design and bespoke software services. We also produce the FeedGhost RSS Reader, and we’ll shortly be [...]