News for hackers. Stuff that matters.
Re:Sin and Cos: The Programmer's Pals by meuk on Tuesday March 06, 2018 @08:48AM (#16528798)
Sin and cos were the first mathematical concepts I truly understood through programming rather than through high-school mathematics. The traditional method of teaching them through triangles feels very unintuitive.
Re:Sin and Cos: The Programmer's Pals by candu on Tuesday March 06, 2018 @08:59AM (#16528863)
Agreed re: triangle method. At the very least, the triangle should be explored in the context of a unit circle. Otherwise, most students struggle with negative sin / cos / tan values ("how do the quadrants work again?"), the connection to Cartesian coordinates, etc. It's a shame that we present so much of mathematics as arcane magic requiring incomprehensible mnemonics to understand - especially in trigonometry, where there are much more intuitive / visual representations of the basic ideas.

(Source: I volunteer with the Toronto Public Library to help high school students with homework, mainly math.)

Re:Sin and Cos: The Programmer's Pals by seanmcdirmid on Tuesday March 06, 2018 @10:33AM (#16529412)
When using sin and cos in graphical programming, I wish code completion for them came up in the context of a triangle and unit circle so I wouldn’t keep referring back to Wikipedia.
Re:Sin and Cos: The Programmer's Pals by Maybestring on Tuesday March 06, 2018 @12:31PM (#16530322)
If, like me, you have the graph of the functions burned into your memory, then the anti-symmetry of sin makes it's geometric interpretation easy to remember.

Sin and Cos correspond to the rejection and projection of two unit vectors. When they rotate past each other, the projection still has the same direction, but the rejection changes sign, so it must correspond to the anti-symmetric sin, not the symmetric cos.

Re:Sin and Cos: The Programmer's Pals by seanmcdirmid on Tuesday March 06, 2018 @12:34PM (#16530352)
I don't use them enough to completely internalize them, so having a reference when I do need to use them is very helpful.
Re:Sin and Cos: The Programmer's Pals by threatofrain on Tuesday March 06, 2018 @10:24AM (#16529362)
What's a top alternative you've found to work aside from triangles?
Re:Sin and Cos: The Programmer's Pals by rocqua on Tuesday March 06, 2018 @10:40AM (#16529461)
Not who you responded to, but as he stated, the best method is the unit circle.

Take a circle of radius 1 around the origin. Draw a line with angle x through the origin. The point where this line intersects the circle has vertical position sin x and horizontal position cos x. Moreover, if you measure the angle in radians, x is how much of the unit circle your angle covers.

This also immediately makes the identity (sin x)^2 + (cos x)^2 = 1 obvious.

https://en.wikipedia.org/wiki/Unit_circle

Re:Sin and Cos: The Programmer's Pals by meuk on Tuesday March 06, 2018 @10:34AM (#16529418)
For me it was associating (sin(r), cos(r)) with a direction (on the unit circle), instead of with a triangle. After that, the relation with a triangle where the longest side has unit length is obvious.
Re:Sin and Cos: The Programmer's Pals by hexane360 on Tuesday March 06, 2018 @12:44PM (#16530437)
Don't you mean (cos(r), sin(r))?

I guess your method works if your angle starts at north and increases clockwise.

Re:Sin and Cos: The Programmer's Pals by skellera on Tuesday March 06, 2018 @10:45AM (#16529495)
I was taught the triangle method in high school and never got a good grasp of it. In college, we used the unit circle method. It is so much more intuitive. Memorizing the unit circle and all the values of sin and cos is so much easier because you just visualize the circle.
Re:Sin and Cos: The Programmer's Pals by Sharlin on Tuesday March 06, 2018 @09:01AM (#16528872)
Yeah. I remember trying out sin and cos on a calculator with random numbers, getting back seemingly random results and wondering what exactly they meant. Then, some years later, studying them on computer by running them in a loop—and realizing that they let you draw circles!
Re:Sin and Cos: The Programmer's Pals by Koshkin on Tuesday March 06, 2018 @08:59AM (#16528864)
> truly understood

Hmm, I wouldn't be so sure... Because it is by the way of geometry that people normally find explanations of mathematical concepts that are the most intuitive to them. (To be fair, some prefer dealing with symbolic algebra instead.)