极坐标与直角坐标的转换是数学中常用的坐标系转换方法,尤其在物理学、工程学和计算机图形学中广泛应用。以下是极坐标与直角坐标的转换公式:
一、极坐标与直角坐标的转换公式
设点 $ P $ 在极坐标系中为 $ (r, \theta) $,在直角坐标系中为 $ (x, y) $,则有:
$$ \begin{cases} x = r \cos \theta \ y = r \sin \theta \end{cases} $$
反过来,若已知直角坐标 $ (x, y) $,则在极坐标中为:
$$ \begin{cases} r = \sqrt{x^2 + y^2} \ \theta = \arctan\left(\frac{y}{x}\right) \end{cases} $$
二、注意
-
角度的范围:
- 在极坐标中,角度 $ \theta $ 通常取 $ [0, 2\pi) $ 或 $ [0, \pi) $,取决于具体定义。
- 若使用 $ \theta \in [0, \pi) $,则需注意 $ \arctan(y/x) $ 的范围。
-
特殊情况:
- 当 $ x = 0 $ 且 $ y > 0 $ 时,$ \theta = \frac{\pi}{2} $。
- 当 $ x = 0 $ 且 $ y < 0 $ 时,$ \theta = \frac{3\pi}{2} $。
- 当 $ x < 0 $ 且 $ y > 0 $ 时,$ \theta = \pi - \arctan\left(\frac{y}{x}\right) $。
- 当 $ x < 0 $ 且 $ y < 0 $ 时,$ \theta = \pi + \arctan\left(\frac{y}{x}\right) $。
三、转换示例
示例 1:极坐标转直角坐标
已知极坐标 $ (r, \theta) = (5, \frac{\pi}{3}) $,则:
$$ x = 5 \cos\left(\frac{\pi}{3}\right) = 5 \times \frac{1}{2} = 2.5 \ y = 5 \sin\left(\frac{\pi}{3}\right) = 5 \times \frac{\sqrt{3}}{2} \approx 4.330 $$
直角坐标为 $ (2.5, 4.330) $
示例 2:直角坐标转极坐标
已知直角坐标 $ (x, y) = (3, 4) $,则:
$$ r = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = 5 \ \theta = \arctan\left(\frac{4}{3}\right) \approx 0.9273 \text{ 弧度} \approx 53.13^\circ $$
极坐标为 $ (5, 0.9273) $
四、总结
| 操作 | 公式 |
|---|---|
| 极坐标转直角坐标 | $ x = r \cos \theta $, $ y = r \sin \theta $ |
| 直角坐标转极坐标 | $ r = \sqrt{x^2 + y^2} $, $ \theta = \arctan\left(\frac{y}{x}\right) $ |
如需进一步了解极坐标与直角坐标的其他应用(如极坐标方程、极坐标图形等),欢迎继续提问!