三维距离计算器

3D Distance Calculator

Compute the straight-line distance between two points in 3D space using d = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²].

📐 计算公式
空间两点距离:d = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²](三维欧氏距离,算例 Δ=(3,4,12) → d=13)。校验:无强校验,非数输入落 «—» 兜底。判据:无固定分级,结果保留 3 位小数,任一坐标分量增大距离不减。

输入两点 (x1,y1,z1) 与 (x2,y2,z2),求三维距离。

Formula & Standard References

Item Formula / Note Source / Standard
3D distanced = √(Δx² + Δy² + Δz²)Euclidean distance
GeneralisationSame form in n dimensionsAnalytic geometry
2D caseDrop z term for planePlane geometry
Metric propertiesNon-negative, symmetric, triangle inequalityMetric axioms
Unit consistencyAll coordinates same unitCalculation note
Applications3D modelling, spatial analysisComputational geometry
📌 计算说明
  • d=√[(Δx)²+(Δy)²+(Δz)²]。
  • 3,4,12 → d=13。

📚 深度解析:三维空间两点距离

💡 常见使用场景

方法
算法:三维欧氏距离 d = √((x2−x1)² + (y2−y1)² + (z2−z1)²),是二维勾股定理在三维的自然推广。坐标可为任意实数,距离恒非负。
算例
例:P1=(0,0,0)、P2=(3,4,12) → d=√(9+16+144)=√169=13.000m。若 P1=(1,2,2)、P2=(4,6,6) → Δ=(3,4,4)、d=√(9+16+16)=√41=6.403m。

❓ 常见问题(FAQ)

三维距离和二维有何关系?
三维距离 = √(二维平面距离² + 高度差²);若 z 相同即退化为二维距离。它本质是勾股定理逐维叠加。
坐标有负值能用吗?
可以,差值平方后负号消失,距离与坐标正负无关,只取决于相对位置。