Monday, January 30

Week Three: Elegant Lines

I am looking for work as it happens. Not out of a job... just yet... but I'd like to find a job with an element of C++ as it seems that its the language of choice for 3D graphics folks. My gut tells me it has something to do with fine control over the performance, but let's not start the language flame wars.

Anyhow, my time has been dragged in several directions and I am only just managing to keep up with the schedule. I realised I was reading a lot of the Buss book on the train and so decided today to swap it for the Red book. Not exactly an exchange that goes unnoticed, I grant you that, as the commute has become a slightly heavier affair.

In Buss, I've been reading a lot on the transformations required to produce the final image. Another sticky point: why we needed to record the depth even when we had transformed the view onto a plane, but I think I have it now; depth calculations are done after the perspective transformation. Quite cool how at how important it was to pick out a depth measure that didn't screw with things too much, otherwise lines would become curves and depth calculations just wouldn't look work out right.

The last thing I read was on how to draw a line in pixels, using the Bresenham algorithm. When I was a childhood programmer, I puzzled for hours over how to draw a line on the screen without using the built-in drawing commands; the algorithm escaped me. I'm sure I would've got it now if I had just sat down and thought about it, but there's something elegant about the Bresenham algorithm. It solves a childhood puzzle for me and so I am happy.

I used to work out almost everything myself. Now lifestyles and workstyles are twenty-four hour commitments; amazing, I feel that I was smarter as a child.

Finished Chapter 2 of the Red book and my head is now awash with function definitions. The Red book spends a number of pages explaining the use of arrays for handling large streams of vertex data and, for the advanced students amongst us, buffer objects. The chapter finishes with a discussion on modelling real surfaces with polygons which blew my mind with the first pass. I just did not get the "subdivision of triangles" initially, my head filling with images of the crystalline virus growing in The Andromeda Strain. A few more minutes spent wisely on the train home today and understanding, once again, made its presence known to me.

Little NeHe progress which is sad, as it demonstrates that I really haven't been spending the time on OpenGL. Busy most nights this week, so looks like it's going to be down to the weekend to rescue the situation...

0 glComments:

Post a Comment

<< Home