直角坐标转极坐标转换器
使用模和象限正确的 atan2 角,将任意笛卡尔点 (x, y) 转换为极坐标形式 (r, θ)。
Angle unit
角度 θ: 53.1301°
- 1
x²
3² = 3 × 3 = 9 - 2
y²
4² = 4 × 4 = 16 - 3
Magnitude r
√(9 + 16) = 5r is the straight-line distance from the origin to the point.
这个计算器是如何工作的?
将 (x, y) 转换为极坐标,计算模 r = √(x² + y²) 和角度 θ = atan2(y, x)。使用 atan2 可保持角度在正确的象限。结果写作 r ∠ θ,θ 可选度数或弧度,并提供 −180° 至 180° 或 0° 至 360° 两种范围。
公式
How this is calculated
输入点的 x(水平)和 y(垂直)坐标,然后选择结果角度的单位(度数或弧度)。模 r 是从原点到该点的直线距离,用 Math.hypot 以数值稳定的方式计算为 r = √(x² + y²)。
角度 θ 使用 atan2(y, x) 而非普通的 arctan(y/x) 求得,因为 atan2 检查 x 和 y 的符号以将角度放置在正确的象限中。其主值范围为 −π 至 π(−180° 至 180°)。我们还报告归一化到整圈的角度,[0, 2π) 或 [0°, 360°),对负结果加上一整圈即可得到。度数通过将弧度值乘以 180/π 得到。
在原点(x = 0, y = 0),模为 0,角度按惯例为 0;atan2(0, 0) 在此返回 0。两个输入都必须是有限数。极坐标形式显示为 r ∠ θ,这是工程学和复数工作中标准的相量表示法。
常见问题
arctan(y/x) 丢失了 x 和 y 的符号信息,无法区分相反的象限,且当 x = 0 时会除以零。atan2(y, x) 使用两者的符号,在所有四个象限中均返回正确的角度。
atan2 的主值角度范围为 −180° 至 180°(−π 至 π)。我们还提供用 0° 至 360°(0 至 2π)范围表示的相同方向,以便使用。
使用 x = r·cos(θ) 和 y = r·sin(θ),其中 θ 以弧度为单位(度数乘以 π/180 先转换)。
也称为
TG we-Calculate Editorial Team. (2026). 直角坐标转极坐标转换器 [Online calculator]. TG we-Calculate. https://we-calculate.com/zh/calculator/rectangular-to-polar-calculator
TG we-Calculate Editorial Team. "直角坐标转极坐标转换器." TG we-Calculate. 2026. https://we-calculate.com/zh/calculator/rectangular-to-polar-calculator.
TG we-Calculate Editorial Team, "直角坐标转极坐标转换器," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/zh/calculator/rectangular-to-polar-calculator
@misc{wecalculate_rectangular_to_polar_calculator, title = {直角坐标转极坐标转换器}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/zh/calculator/rectangular-to-polar-calculator}}, year = {2026}, note = {TG we-Calculate} }
这个计算器对您有帮助吗?
