MSc Survival Guide Part 3: Maths & Graphics, Trees, Waves and Ray Tracers

If your background is that of little programming then the Graphics and Mathematics assignments will turn you into a man. After this course you can boldly walk with self-brandished pride and truly call yourself a ‘coder’ . Before that, this course will academically crush you into a small, weak and pathetic fry. My advice: don’t be over proud, you will only suffer more.


The Maths & Graphics course marks a point where you will want to become very well acquainted with some of the smarter programmer friends – you will want to very quickly befriend.

If you’ve not been set the first coursework already, the procedural tree assignment – then the idea is to develop a program that takes a set of instructions and recursively apply vectors to so that basic tree models are created.

I remember spending nights alone in the lab trying to master how these crazy vectors point in any direction besides chaos.
The week following the hand-in date and still no progress, I kindly sat my parents down and explained the master will take 3 more years to complete.
On the second overdue week, I told William Lathem I had made a terrible mistake and that I would be handing in my gun and badge in at the end of the week (I adopt the persona of MacGyvr when I get sleep deprivation).
By the third week I was not on speaking terms with anyone and began to smell weird.
Every week I emailed an excuse to our lecturer and soon I had theoretically killed off every possible relative I had. It was 5am, my hands shook and I finally type my confession: that I had no idea how to recursively do anything.

Gareth the Maths & Graphics teacher is a top of the line lecturer. He knows everything within his field, responds quickly to emails, has an enormous resource of exciting experience and shares his entrepreneurial advice with a charm and an energy that is hard to equal.
At times his optimism gets the best of him. Head in my hands and without hope I got the response “It’s just pretty pictures, there’s nothing to it. Good luck, Gareth”.
I snapped.
I had lost every ounce of self-worth and threw myself at the mercy of my classmates.
I found the most confident bragger around the water cooler, locked him a room and sat him in front of my laptop until he had explained what on earth was going on. What I did not understand at the time is that: for any experienced coder being turned to for help is a sincere compliment and I highly regret not doing it sooner.
Although I’m still uncertain of the procedural tree code to this day, Luke Haugh sat with me for many evenings and finally got my vectors travelling tree-like.
Although its pretty simple and basic, I finally managed finished my tree simulator and handed it in only six weeks late.


The next assignment is the Waves assignment.
It’s the same sort of deal but a bit harder, at this point I had more code experience and a higher understanding of Direct X.
There are a number of example tutorials that come bundled within Direct X 9, the mesh tutorial is particularly useful.
The wave assignment is sine wave manipulation. It was grueling, I remember feeling disheartened whenever passing any large bodies of water.
However, mastering curve transformation in a 3D environment makes it easy to replicate in other formats.
For instance, I was able to develop a wave simulator that interacts dynamically to rigid bodies with a 48 hour game-hack competition.
Available to view here.
Scanline Renderer
This assignment is so difficult that we all had to collaborate and work together in order to to progress each others Scanline Renderers. Getting started is the most difficult path and I speak on behalf of all MSc students when I say we went through hell and back.

Turning the Scanline into a Ray Tracer is when the class turn each other. Desperate to churn out a Ray Tracer superior to that of the class and there’s plenty of resources online to do it. My Ray Tracer was incredibly unconventional and it marked the end of the most intense programming I hope to ever endeavour.