Math to learn for graphics programming?

Specious1600

Newcomer
Hi, all! Let me tell you a little about myself! I'm a 17 year old high school student who would like to become a real-time graphics programmer. I have a decent aptitude for mathematics and a newly-sparked interest in exploiting that to make pretty, well-optimized images show up on the screen :)

Now, my question is, what mathematics should I learn to begin? I am willing to learn anything and would be more than happy to dedicate a significant portion of my time to it. At this point, I know about the equivalent to a year of college calculus (AP calculus is supposed to be that, anyway)...so, where do I begin? I am not averse to spending money for books, so feel free to point me to any/all resources you feel would get me up to speed such that I can start writing (or reading about writing) graphics programs of nontrivial complexity (I know there's the programming side of things to consider, too, but I want to focus on the maths first).

Thank you all for your time! I hope to become a valuable asset to the graphics programming community one day, although I do realize there's going to be a lot of work before I get there.

-Specious1600
 
Linear algebra and algebraic geometry for starters, pretty much everything else after that. Everything depends on what exactly you want to code. If you want something to hold your hand through the journey, you can buy "Mathematics for 3D Game Programming and Computer Graphics" - it is a pretty good beginners reference book. But don't expect to find there anything new if you're a math major, future math major, or non-math major but with good math background (still possible when you're 17). Basics are just not a rocket science. :-]

Oh, and first skill every coder need: searching. ;) I'm pretty sure this question has been asked multiple times in the past.
 
I've got to say, this post is a refreshing change from people that want to do graphics without having to learn any advanced math.

In addition to what ConayR said, I'd recommend some statistics/probability. Many of the things we compute in graphics don't have closed-form solutions, and stochastic sampling is a very common tool for approximating the solution. I also found topology to be very useful, maybe not day to day, but in getting insight into what I was really doing.

It might be worth grabbing a recent SIGGRAPH or GDC proceedings, looking through the papers, and making a list of all the math concepts you don't understand. (Don't get discouraged, if you make it through everything on your list you'll probably qualify for a math Ph.D. Even within graphics there's a lot of specialization -- prioritize what you want to learn about.).
 
Easiest way to me would to look at a computer science degree program and see what math courses are listed. Of course that's pretty general but would certainly give you a good idea.
 
Easiest way to me would to look at a computer science degree program and see what math courses are listed. Of course that's pretty general but would certainly give you a good idea.

Not sure if this is universal, but my experience was that computer science degree classess are 50% useless BS and 50% useful stuff. It's not easy to filter the bad part if you have no experience whatsoever.
 
Linear algebra, trigonometry, matrix/quaternion math are the popular topics. I'd argue calculus, differential equations and mostly integral calculus can be useful as well. And perhaps a good background on numerical analysis and computational science would be good too.

I'm sure there's alot of other strains of mathamatics that could be useful, but as mentioned by ConayR, a good book on 3d graphics would be a great start. That way you can then expand on all the topics that interest you and that you feel are applicable.
 
Not sure if this is universal, but my experience was that computer science degree classess are 50% useless BS and 50% useful stuff. It's not easy to filter the bad part if you have no experience whatsoever.

Sure, but what are you suggesting he does otherwise? A degree doesn't mean you're really going to know what you got it in, in a truly meaningful way. But it does mean you were able to handle the load, you had the dedication, and you should have a good clue as to all the math covered in the program (which with computer science tends to be a lot).

A single, general book is only going to tell you the subject matter and what it's used for. Never going to really teach you anything of value.
 
Besides learning the math involved, i *highly* recommend sitting down and trying to write a scanline rasterizer yourself - BEFORE learning "the right way to do it". Just challenge yourself to paint a triangle on the screen, from scratch.

After, you'll learn things from the proper books and go - wow, I was doing that entirely in a wrong / slow / ugly way.

And the right way will stick in your head because of it.
 
Not sure if this is universal, but my experience was that computer science degree classess are 50% useless BS and 50% useful stuff. It's not easy to filter the bad part if you have no experience whatsoever.
That's why you take a computer *science* course at a place that differentiates that from software engineering... and ideally one that's closely tied if not part of the same faculty as math (rather than engineering) :)

But yes, as far as math goes for graphics, linear algebra and calculus are the most useful... but lots of other stuff is relevant, like computational geometry, graph theory, statistics/probability, differential equations and more, so for the most part you can't go wrong learning more math... most of it is quite relevant to at least one area of graphics!
 
In both cases I think a bulk of stuff is just a filler. YMMV though. :)
Well I've naturally only been to one school for undergrad, but definitely I'd say at least 80% of the stuff that I learned has been very useful to me... if not directly applicable, still very good for building an intuition about more theoretical mathematical and computational concepts and how they relate... which turns applicable more quickly than you'd imagine :)
 
Oh, I can imagine - believe it or not but I have some degree and I work as a developer. There's a lot of useful stuff I have learned. It's just that my experience with higher education is that waaay too much stuff is a filler. Regardless of your university or your minor. ;)
 
Besides learning the math involved, i *highly* recommend sitting down and trying to write a scanline rasterizer yourself - BEFORE learning "the right way to do it". Just challenge yourself to paint a triangle on the screen, from scratch.

How would you do this without having the required knowledge though? (I'm actually interested in doing this) I have a couple books myself but i was actually rather crap at maths in highschool so im starting with a math primer. I also grabbed a beginners book on c++ and one on dx.
 
Unrelated to math: get the big book by foley, van dam and others. Read it as a novel, it's quite entertaining. Should give you a nice overview and a good explanation of the working vocabulary.
 
How would you do this without having the required knowledge though? (I'm actually interested in doing this) I have a couple books myself but i was actually rather crap at maths in highschool so im starting with a math primer. I also grabbed a beginners book on c++ and one on dx.

Think out the problem at hand.

You can solve it with basic algebra (create an equation that allows you to test whether a given point is inside a triangle: you can do that thanks to good old pythagoras).

Hell, don't even bother creating a pretty graphic - just start by having console output in the shape of a triangle.
 
I would agree with ZSouthBoy.

Try and do one yourself and see what mistakes you make along the way. When I was quite young I had a go at simple line based renderer (it was for running on a 16MHz processor). It was before I had been introduced to matrices so I sat and calculated the whole projection stuff the long way. When I eventually saw everything being done with matrices it was a revelation!

Also don't get too bogged down learning Math, there are plenty of other non (or at least minimal) Math related programming concepts that will be useful in your chosen field.

CC
 
I'd get in a bit of "softer" maths related subjects like structural logic, game theory, econometrics, or even linguistic theory as well. I think those kinds of things help develop problem solving ability, but perhaps that's just the statistician in me talking and the more mathematically apt should go with computational science.
 
Think out the problem at hand.

You can solve it with basic algebra (create an equation that allows you to test whether a given point is inside a triangle: you can do that thanks to good old pythagoras).

Hell, don't even bother creating a pretty graphic - just start by having console output in the shape of a triangle.

I'm, to my own admission rather lost at the moment. I'm seriously missing something . I have no idea how to bash out a scanline rasterizer, I just can't think of how to do it now. That coupled with the fact that I have no idea what library to use for console graphics means I'm going to have to go a googling.

Sorry for going OT.
 
Back
Top