Archived

This topic is now archived and is closed to further replies.

newOperator

Importance of Calculus?

Recommended Posts

quote:
Original post by newOperator
How important is calculus in game programming? In programming in general?

I''m just curious -- haven''t taken any calculus yet.


Extremely important. You can fake your way through with just the basic 3D stuff. But once you get into curves and surfaces, quaternions, and physics, calculus is a must.

Share this post


Link to post
Share on other sites
Let me tell you that after algebra, calculus is most important field of mathematics. It appears everywhere .

Don''t try to get out of learning it, because its importance is just staggering. You can avoid calculus completely in game programming, right up until you have to implement real physics. At that point you''re probably asking for trouble.

Share this post


Link to post
Share on other sites
Well, wrburns is pretty much correct about the last part, but you don''t necessarily need to do any of those to participate in game programming, and you certainly don''t need those to do a large amount of general programming tasks. You can get by easily in programming without calculus. Only certain types of programs, and only certain parts of those programs actually use calculus.

Of course, I''d encourage you to learn calculus, just because it''s so darned cool. (Yes, maybe I''m a masochist.) And you never know when it might actually be useful. If you''re familiar with it, then you''re that much more prepared for those unknown situations. But it''s still not incredibly important for most programming tasks.


int Agony() { return *((int*)0); }    Mwahaha... >8)

Share this post


Link to post
Share on other sites
I used mostly linear algebra in my 3D calculations.

I did make use of calculus for purposes of calculating an optimal test point for collisions between two objects (testing at the closest passing point), but I eventually scrapped that for predicting the first point of collision between them.

Other than that, I haven''t used calculus.... yet.

Share this post


Link to post
Share on other sites
quote:
Original post by Promit Don''t try to get out of learning it, because its importance is just staggering.



gee well now u tell me, 2 years too late!

how am i ever going to relearn it, i had so much trouble getting into it!

Share this post


Link to post
Share on other sites
Calculus is important because you learn about vectors and parametric equations. Its more important so you can sit around and trade calculus horror stories with your geek friends later in life....

"The best way to learn calculus is to work problems until you puke, then wipe off the puke and work some more"

Share this post


Link to post
Share on other sites
I''d say it''s not necessary, and its importance depends on what you consider important. If you don''t care much for understanding the underlying algorithms and concepts, I doubt you''d consider it important. If you don''t think that learning Lisp will make you a better C++ programmer, I doubt you''d consider it important.

Share this post


Link to post
Share on other sites
Of course, depending on what you are working on, the importance of Calculus will vary. I make games for a living but I don''t do renderer or physics, but both calculus and algebra have been very useful to me in the course of solving problems at work.

I would say that it is important even if only to further your understanding of mathematic concepts. Calculus is about the most useful form of math there is. Its applications are all over the place, and they are practical ones too! I laughed when I was learning it in school, but I can think of several specific instances while working on a problem that I solved the problem by remembering something from Calculus courses in college.

Of course, taking calculus, or algebra, or any specific course will not make you a great programmer or instantly make you knowledgeable about all math related things. I mean, honestly how much are you actively able to recall after your final exam? I know I tried to forget it as quickly as possible! The point is that a few years later when you do come across a problem, something will *click* in your head saying "Hm... I think I''ve seen this before." Then you bust out the dusty calculus book and find that chapter (I still have mine and it is well worn and loved.)

The bigger picture to me, is that unless you are a very unique person, any math problem you come across has already been solved by someone smarter than you, and more efficiently than your solution. I find that the problem is being aware of the existing solution and then understanding it. Taking courses in calculus (or algebra, etc.) or even studying on your own by reading some books will benefit you greatly. Its especially pleasing in those instances like I said, where you have to solve a problem and you realize you already know the answer because you read about it three years ago in your calc book.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Plus, wouldn''t you all say that calculus is generally a prerequisite for matrix theory and linear algebra? You must learn these things to do game programming unless you want to spend the bulk of your time coming up with untidy, brain bending solutions to a problem that the mathematically sophisticated could approach with ease.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Depends. What level of calculus are you talking about? If you mean basic high-school calculus, (derivatives, integrals), then yes. These concepts are fundamental in math and physics. You''ll get nowhere without it (same with Linear Algebra, you _need_ to know your vector/matrix math and linear transforms for any _graphics_ programming).

Do you need to know University level calculus? Maybe. I''m writing a clothsim right now and it''s interesting to see real-world applications to ''useless'' first-year math like Taylor approximations, mid-point integration, and so on. And it doesn''t hurt to understand orthogonal/orthonormal basis, product spaces, etc. when you''re writing a renderer or raytracer, although it''s not strictly necessary.

Math is a shallow pyramid of knowledge. The fundamentals at the base (arithmetic, fractions, simple geometry, simple algebra), are completely necessary for everyone, without exception. Thankfully these concepts are extremely simple and taught in grade school. In fact most of what you need for life you finished learning before puberty. Stepping up the pyramid severely decreases the application of math concepts. Do I _need_ to understand FFT''s to use them? As an average office worker? Definitely not. As a programmer? Still no. As a graphics programmer? Even then probably not, I can likely find code for whatever it is I''m doing online somewhere. But understanding it for myself gives me full control over my program, and opens up the possibility for advanced optimization. Furthermore I''ll reduce bugs by understanding what my functions actually do, and be able to extend the functionality with (relative) ease.

Also, advanced graphics papers on light modelling, water simulation, etc. will crush you without calculus. Actually they''ll crush you with or without it, but that''s another thread. I was looking into writing a Navier-Stokes solver for water simulation the other day for example, and without having any fluid mechanics courses under my belt, I was completely overwhelmed. I can comprehend the overly simplified non-compressible heightfield approximations (like in the dxsdk), but the real thing is just baffling.

Sorry for going off on a tangent. By the way, good programming and software design skills are easily 10x more important than sound mathematical knowledge for game programming.

P.S. I assume you''re a high-school student, age 16-17 or so? High-school calculus is really fun. Mostly memorizing derivatives/integrals, a few identities, and simple ''class'' problems. (Filling a conveniently shaped tank at one rate while it drains at another, calculating how much fuel you need to get to the moon, stuff like that). If the course isn''t mandatory in your school (I know some places postpone that till first year uni/college), you should definitely sign up for it anyway. Easy marks if you''re mathematically inclined in any way and have decent study habits.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Oh god calculus was pure torture... i hated that sh*t!! But yeah it''s good stuff to know (or at least get the hang of).

These days you don''t need to be able to solve any it--that''s what computers are for--but you will need to understand what''s going on.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
"These days you don''t need to be able to solve any it--that''s what computers are for--but you will need to understand what''s going on."

Any manual/rote calculation is always by far the easiest part.

Share this post


Link to post
Share on other sites
Lol, i probably must have studied it in my maths classes, but that was like 3-4 years ago and now i don''t even know what one of the concepts listed in this thread is about.

Share this post


Link to post
Share on other sites