What are good ways to learn trigonometry and higher math through programming?
Asked by
MellowKite42
I'm an experienced programmer, but my higher-level math skills have always been weak. I've tried working through traditional math books, but I lose motivation when I can't see how the material applies. Are there any books, courses, or websites that teach trigonometry and more advanced topicsโsuch as calculus or linear algebraโthrough practical programming projects?
Answers
You might like From Mathematics to Generic Programming by Stepanov and Rose. It starts with fundamental math, explains where the formulas come from, and then turns the ideas into C++ algorithms. The examples are practical enough that theyโre fairly easy to adapt to C or another language.
Reply to this answer
A good way to make the math feel useful is to build basic computer graphics projects. Try implementing vectors, transformations, curves, z-buffering, antialiasing, or simple computer-vision algorithms such as homographies and edge detection. Those projects naturally give you a reason to learn the trigonometry and linear algebra behind them.
Reply to this answer
Donโt overlook standard college-level calculus and linear algebra textbooks. A useful first project is writing your own vector and matrix library, then using it for a physics simulation. That gives you immediate reasons to understand the operations instead of just memorizing them.
Reply to this answer
You can connect trigonometry and calculus to a small game or simulation. For example, make a character jump along a gravity-based parabolic trajectory, then experiment with velocity, acceleration, and time steps. Programming can reinforce the math, although youโll still need to learn the underlying concepts rather than expecting code alone to teach them.
Reply to this answer
Add your answer
Answers are reviewed before publication.
QuietMarble28: Hackerโs Delight is also worth checking out if you enjoy low-level programming. It focuses on mathematical tricks and algorithms involving integer and bit-level operations; despite the title, it isnโt about network security.