Calculadora de Distância 3D — Formula
Distance Formula
3D Distance
d = sqrt((x₂-x₁)² + (y₂-y₁)² + (z₂-z₁)²)
2D Distance
d = sqrt((x₂-x₁)² + (y₂-y₁)²)
Both are generalizations of the Pythagorean theorem.
Manhattan Distance
Also called taxicab distance: d = x₂-x₁ + y₂-y₁ + z₂-z₁
This is the distance when you can only move along grid lines (like streets in Manhattan).
Exemplo Resolvido
Distance from (1, 2, 3) to (4, 6, 8).
- dx = 3, dy = 4, dz = 5
- 3D distance = √(9 + 16 + 25) = √50 ≈ 7.0711
- 2D distance = √(9 + 16) = √25 = 5
- Manhattan distance = 3 + 4 + 5 = 12