Sine and Cosine

Sine and cosine — a.k.a., sin(θ) and cos(θ) — are functions revealing the shape of a right triangle. Looking out from a vertex with angle θ, sin(θ) is the ratio of the opposite side to the hypotenuse, while cos(θ) is the ratio of the adjacent side to the hypotenuse. No matter the size of the triangle, the values of sin(θ) and cos(θ) are the same for a given θ, as illustrated below.

正弦和余弦--又称sin(θ)和cos(θ)--是揭示直角三角形形状的函数。从角度为θ的顶点向外看,sin(θ)是 对边斜边的比率,而cos(θ)是 临边斜边的比率。无论三角形的大小,在给定的θ下,sin(θ)和cos(θ)的值都是一样的,如下图所示。

Look at the left-most figure above (the unit circle). The triangle's hypotenuse has length 1, and so (conveniently!) the ratio of its adjacent to its hypotenuse is cos(θ), and the ratio of its opposite to the hypotenuse is sin(θ). Therefore, by placing triangles at the point (0,0) of the x/y plane, the functions sin(θ) and cos(θ) can be found by recording the values of x and y for every θ. Below, click play to see this process unfold. Angles are in radians (i.e., π/4, π/2,...).

请看上面最左边的图(单位圆)。三角形的斜边长度为1,因此(很方便!)它的临边斜边的比值为cos(θ),而它的对边斜边的比值为sin(θ)。因此,通过在x/y平面的点(0,0)处放置三角形,可以通过记录每个θ的x和y的值来找到函数sin(θ)和cos(θ)。角度的单位是radians(即π/4,π/2,...)。

Sin(θ)

Cos(θ)

Of course, computers and calculators don't actually draw circles to find sine and cosine. Instead, they use approximations like the Taylor series:

当然,计算机和计算器并不真正画圆来寻找正弦和余弦。相反,它们使用泰勒级数: 这样的近似方法。 \[\begin{aligned} \sin{\theta} = θ - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - \frac{\theta^7}{7!} \cdots \\ \cos{\theta} = 1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \frac{\theta^6}{6!} \cdots \end{aligned} \]

Using sine and cosine, it's possible to describe any (x,y) point as an alternative, (r,θ) point, where r is the length of a segment from (0,0) to the point and θ is the angle between that segment and the x-axis. This is called the polar coordinate system, and the conversion rule is (x,y) = (rcos(θ),rsin(θ )). Play with the figures below to see real-time conversion between Cartesian (i.e., x/y coordinates) and polar coordinates.

使用正弦和余弦,可以将任何( x, y )点描述为另一个(r,θ)点,其中r是(0,0)到该点的一段长度,θ是该段与x轴的夹角。这被称为极坐标系,转换规则是(x,y)=(rcos( θ ),rsin(θ))。玩玩下面的数字,看看直角坐标(即x/y坐标)和极坐标之间的实时转换。