3 ms·
There's a really, really simple way to get kids to love trig. Get them to write a video game. Seriously, as a video game programmer, you use trig _every day_.
by Patrick_Devine 13y ago
There's a really, really simple way to get kids to love trig. Get them to write a video game.
Seriously, as a video game programmer, you use trig _every day_. If you want to find the distance between two points when you have the angle (eg. I'm firing a projectile at a certain angle), use cosine for the length of the x axis and use sine for the y axis. You get the hypotenuse from using pythagoras' theorem. If you want to find the angle between two points, use arc tangents.
Once kids have mastered all of that, you can teach them law of cosines and get into linear algebra; simple rotational matrices which can let you do collision detection and a whole bunch of other really, really cool stuff.
So yeah, Bob the builder might be boring as shit as a word problem, but Bob the builder might be a pretty cool video game. Without trig, as a game, Bob the builder is probably going to be boring as shit too.
- dllthomas 13y ago"If you want to find the distance between two points when you have the angle (eg. I'm firing a projectile at a certain angle), use cosine for the length of the x axis and use sine for the y axis. You get the hypotenuse from using pythagoras' theorem." Using cosine and sine and then Pythagorean theorem to get the length of the hypotenuse doesn't make sense - in order to get the length of the X and Y components with cosine and sine you need to already know the length of the hypotenuse.
- Patrick_Devine 13y agoYou're right, I did state it a little awkwardly, but the statements are correct. I'll give a more concrete example: I'm firing a projectile at 52 degrees and it needs to move 10 units. I'm at (5,7), where does the projectile end up? delta x = cos(theta) * 10 delta y = sin(theta) * 10 So my final position is (5 + 6.16, 7 + 7.88), or (11, 15). If I already knew how far the delta X and delta Y were, I could get the length of the hypotenuse with sqrt(6.16^2 + 7.88^2). That equals roughly 10, of course. If you want to try this out yourself, just remember that most trig functions are done in radians, so convert theta to radians with pi * theta (degrees) / 180.
- dllthomas 13y agoYes, I certainly wasn't disagreeing that trig is useful for games. The "if you want to try this out yourself" comes across a little patronizing in this context...
- Patrick_Devine 13y agoIt was more trying to be helpful. A lot of people's heads explode when they see trig, and they stumble on things like radians vs degrees. You can do some really cool stuff with just a little bit of knowledge.
- dllthomas 13y agoYeah, I don't get why more people don't get trig - it's always come very naturally to me, but I have to work to recognize that's not the case for everyone, particularly when confronted with experiences from my past like working on homework with math majors and finding them confused when I applied a trig identity to the problem...