So. That Calculus Thing.

Started by
14 comments, last by Liuqahs15 11 years, 7 months ago
All programming is math.

You can write some software without knowing the math, just as you can work as a cashier in McDonald's without understanding accounting. Most web devs seem to get by OK </cheapshot>.

If you want to get past the polyester uniform and smile stage, you're going to need to understand what you're doing, not just rotely regurgitate some steps. First and foremost you need algebra. Most basic programming is actually just applied algebraic field theory (sets, operators, intervals). 3D graphics requires the understanding of linear algebra (vectors, matrices). 2D graphics almost always need trig. Audio is sometimes off in Fourier land (real-valued nonlinear functions and polynomial manipulation). Calculus is not necessary for most programming but learning it provides you with useful analytic skills that you can apply elsewhere.

Or, be happy in a job with a free virtual sandwich with every shift.

Stephen M. Webb
Professional Free Software Developer

Advertisement
Basic Algebra is not a good place to be, even with 2D game programming. Imagine a game like asteroids, where the ship rotates and shoots on an angle. The only information you have to calculate how to shoot the bullet is the number of pixels it moves across the screen per frame when the angle is 0, 90, 180 or 270 (facing straight up, down, left or right), and (most likely) the actual angle at which the ship is turned. If you have no idea how to solve this problem, you need to really put in the time to learn it. That's not calculus, though. That's Trigonometry/Geometry. Maybe you could somehow solve the problem without ever needing to know what sin, cos and tan exist for, but you could also just learn them and move on.

I will say, though, as someone who was completely awful at Math before he started programming, once I had real applications of Math, not only did it become easy, it became incredibly fun. You should just go find a website/old textbook in your room somewhere, and jump in.
once your normalize your first vector, and all your problems with finding certain info, e.g. what is the angle between the two? what is the distance? how can i make sprite A approach sprite B?.. and so on, just magically goes away in one fell swoop!

ill just say this though, this is from my own experience! i had NO idea what i was doing, but i learned over time to use basic trigonometry..
once i learned vectors, many door opened at the same time, so you REALLY need to look into this, because it REALLY pays off :)
especially if you are working with games, which are graphical.. vectors make things so much easier

anyways, i don't personally know "lots of math", either. but just knowing what the basics really are and learning that is a huge improvement
i wish someone slapped my wrist many years ago and pointed to the nearest vector tutorial site :)
Guys you're all being super helpful. Thanks for the wealth of advice, I've got a much clearer idea of where I'm headed now.
Trig is important. Know the pythagorean theorum. Linear algebra is important. I think a large difference between programming and "mathing" is that when you are programming you have to understand how it works at a higher level. You can know exactly how to calculate a dot product, but if you don't know what the result is and how to use it, you won't be able to program using it. Additionally, you can upgrade from McDonalds to A&W if you know what a dot product is used for but not how to calculate it.

Guys you're all being super helpful. Thanks for the wealth of advice, I've got a much clearer idea of where I'm headed now.


Good luck. I think you'll find that math can sometimes be just as exciting as programming

This topic is closed to new replies.

Advertisement