Hacker News new | ask | show | jobs
by jselzer 5722 days ago
Not sure I agree with the author's assertion that matrix math should be avoided until absolutely necessary when learning graphics programming. I don't even agree with the idea that matrix math is particularly difficult.

When I was in university, we learned graphics programming by taking a linear algebra course or two. This was applied in a graphics course in which all students built their own software renderer, from top to bottom.

I have seen coworkers who never learned matrix math fumble with obfuscated code that could be replaced with one line of matrix operations. Several game companies I have interviewed at make linear algebra a very big part of their technical interview process. IMO if you are even remotely comfortable with math, learning matrix math is a HUGE benefit (maybe even a necessity) if you want a serious job as a game developer... the easiest way to get going with it is to just take a university-level intro to linear algebra course. That is all you need to understand the math underneath the entire rendering pipeline.

6 comments

Vector, Matrix, Affine transformations, quaternions - this can all be managed in a week or two for solid understanding, even if one's math skill is at advanced arithmetic (pre algebra) level, since it is Linear algebra after all. It really is not that hard, and of utter importance in graphics.

No excuses: http://www.khanacademy.org

There is a book Math for game programmers or something, I forgot, but these are the basic tools you have as a graphics programmer. I'd argue you need to expand knowledge into physics if you want to be a good graphics programmer (optics), and without some calculus, namely integration, forget about advanced graphics programming. You could do it, but you won't understand it - you'll end up waiting for others to code examples and publish non-scientific papers in order to understand what you need to do. Thus, you will always lag behind cutting edge and won't be able to read published papers and implement/expand them.

I have kind of a bad memory, so I have these two books I find very helpful when I want to refresh my pre-calculus knowledge: http://www.amazon.co.uk/Mathematics-Physical-Sciences-Robert... and http://www.amazon.co.uk/Further-Mathematics-Physical-Science...

The key point he makes is that you don't _have_ to focus on the hard stuff to be productive and actually make something useful. I think it's an important thing to realize and a great way to learn...build on little personal victories and gain a level of confidence before you take on the really tough challenges.
It's useful to know eventually, but I think the author is right that, if you want to make games, you should learn how to make pong first. (How many hobbyists would be willing to learn the equivalent of two college courses before they can rotate a circle on screen?)
In my university's game design society, we have a short competition to make "pong with a twist" near the start of the year. Use of Game Maker and similar programs is encouraged, because we're "game design" not "game programming", but it's the same principle: if you want to make games, start by making a game.
Matrix math is actually incredibly easy. I've never really understood why a linear algebra class is considered a difficult class by some. If you were able to handle high school algebra, then the ideas you learn in linear algebra won't be particularly beyond that. At the very least, a simple understanding of basic matrix math will get you pretty far in graphic programming.
Matrix math is covered in a few classes, it's all the abstractions that state the same thing in 10 different ways. Gaussian elimination, determinants, subspaces, eigenvectors, etc that make it a full course.
I've seen various resources around hn for getting familiar with linear algebra (which seems hugely useful) - let's say that I'm not in a position to take an intro to linear algebra cours at a university, what other alternatives are there? Any online courses?

And how much calculus is required to have a chance at understanding the material?

It might be nice to have some study groups in the bay area for people looking to get into this with a regular schedule.

The MIT Linear Algebra course by Gilbert Strang is my personal favorite. I don't think calculus is really needed to understand the material. Linear algebra does have a lot of benefits in a multivariable calculus course though.

It can be found here: http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-...

Your local community college probably offers linear algebra and may offer them at more convenient times. I only offer that if you haven't considered it.

Assuming no class is available, depending on how deeply you want to learn the subject, linear algebra is fairly accessible. It sounds like the introductory level stuff (University 200 level) is what is recommended in that article, so the good news is you don't need a class to learn it.

I don't think not having calculus would prevent learning it at this level. Personally I'd just look at reviews for linear algebra textbooks on Amazon and buy the best one. One thing I often do when trying to learn a subject on my own is a go to the University bookstore to figure out what materials I should start with.

Then just read the chapters and work the sample problems. When doing any matrix manipulation by hand (boring, but good to verify and help internalize understanding) it's easy to use that software to check results.

Basic linear algebra is one of the easier mathematics to teach one's self.

Khan Academy is really great to learn the basics from. I remember watching it, because my college and curriculum did a poor job of explaining it.
> I'm not in a position to take an intro to linear algebra cours at a university

What kind of non-position are you talking about?

At least here in Germany, there's absolutely no problem with attending a linear algebra lecture as a guest. Just ask the lecturer whether it's okay for him/her, and everything is fine.

My faculty even allow people to attend its courses as a regular student for some money (not much, ~35 Big Macs).

But of course, you need to be close to a university with decent linear algebra lectures, have enough time and so on. That's harder.

Linear algebra is absolute basic stuff. It is part of the first and second semester in mathematics, and also taught in computer science, physics, chemistry and many other fields.

So all you need is a university that provides natural sciences. I can't imagine such a university being hard to find.

HN would disagree with the one rant the author spent the longest time on.