As três possíveis interseções linha-esfera:
1. Sem interseção.
2. Ponto de intersecção.
3. Intersecção de dois pontos.
Na geometria analítica , uma linha e uma esfera podem se cruzar de três maneiras:
Sem interseção
Cruzamento em exatamente um ponto
Cruzamento em dois pontos.
Os métodos para distinguir esses casos e determinar as coordenadas dos pontos nos últimos casos são úteis em várias circunstâncias. Por exemplo, é um cálculo comum a ser executado durante o traçado de raio .
Cálculo usando vetores em 3D
Na notação vetorial , as equações são as seguintes:
Equação para uma esfera
‖
x
-
c
‖
2
=
r
2
{\ displaystyle \ left \ Vert \ mathbf {x} - \ mathbf {c} \ right \ Vert ^ {2} = r ^ {2}}
x
{\ displaystyle \ mathbf {x}}
: pontos na esfera
c
{\ displaystyle \ mathbf {c}}
: ponto central
r
{\ displaystyle r}
: raio da esfera
Equação para uma linha começando em
o
{\ displaystyle \ mathbf {o}}
x
=
o
+
d
você
^
{\ displaystyle \ mathbf {x} = \ mathbf {o} + d {\ hat {\ mathbf {u}}}}
x
{\ displaystyle \ mathbf {x}}
: pontos na linha
o
{\ displaystyle \ mathbf {o}}
: origem da linha
d
{\ displaystyle d}
: distância da origem ao longo da linha
você
^
{\ displaystyle {\ hat {\ mathbf {u}}}}
: direção da linha (um vetor unitário )
Pesquisar pontos que estão na linha e na esfera significa combinar as equações e resolver , envolvendo o produto escalar dos vetores:
d
{\ displaystyle d}
Equações combinadas
‖
o
+
d
você
^
-
c
‖
2
=
r
2
⇔
(
o
+
d
você
^
-
c
)
⋅
(
o
+
d
você
^
-
c
)
=
r
2
{\ displaystyle \ left \ Vert \ mathbf {o} + d {\ hat {\ mathbf {u}}} - \ mathbf {c} \ right \ Vert ^ {2} = r ^ {2} \ Leftrightarrow (\ mathbf {o} + d {\ hat {\ mathbf {u}}} - \ mathbf {c}) \ cdot (\ mathbf {o} + d {\ hat {\ mathbf {u}}} - \ mathbf {c} ) = r ^ {2}}
Expandido e reorganizado:
d
2
(
você
^
⋅
você
^
)
+
2
d
[
você
^
⋅
(
o
-
c
)
]
+
(
o
-
c
)
⋅
(
o
-
c
)
-
r
2
=
0
{\ displaystyle d ^ {2} ({\ hat {\ mathbf {u}}} \ cdot {\ hat {\ mathbf {u}}}) + 2d [{\ hat {\ mathbf {u}}} \ cdot (\ mathbf {o} - \ mathbf {c})] + (\ mathbf {o} - \ mathbf {c}) \ cdot (\ mathbf {o} - \ mathbf {c}) -r ^ {2} = 0}
A forma de uma fórmula quadrática agora é observável. (Esta equação quadrática é uma instância da equação de Joachimsthal.)
uma
d
2
+
b
d
+
c
=
0
{\ anúncio displaystyle ^ {2} + bd + c = 0}
Onde
uma
=
você
^
⋅
você
^
=
‖
você
^
‖
2
{\ displaystyle a = {\ hat {\ mathbf {u}}} \ cdot {\ hat {\ mathbf {u}}} = \ left \ Vert {\ hat {\ mathbf {u}}} \ right \ Vert ^ {2}}
b
=
2
[
você
^
⋅
(
o
-
c
)
]
{\ displaystyle b = 2 [{\ hat {\ mathbf {u}}} \ cdot (\ mathbf {o} - \ mathbf {c})]}
c
=
(
o
-
c
)
⋅
(
o
-
c
)
-
r
2
=
‖
o
-
c
‖
2
-
r
2
{\ displaystyle c = (\ mathbf {o} - \ mathbf {c}) \ cdot (\ mathbf {o} - \ mathbf {c}) -r ^ {2} = \ left \ Vert \ mathbf {o} - \ mathbf {c} \ right \ Vert ^ {2} -r ^ {2}}
Simplificado
d
=
-
2
[
você
^
⋅
(
o
-
c
)
]
±
(
2
[
você
^
⋅
(
o
-
c
)
]
)
2
-
4
‖
você
^
‖
2
(
‖
o
-
c
‖
2
-
r
2
)
2
‖
você
^
‖
2
{\ displaystyle d = {\ frac {-2 [{\ hat {\ mathbf {u}}} \ cdot (\ mathbf {o} - \ mathbf {c})] \ pm {\ sqrt {(2 [{\ hat {\ mathbf {u}}} \ cdot (\ mathbf {o} - \ mathbf {c})]) ^ {2} -4 \ left \ Vert {\ hat {\ mathbf {u}}} \ right \ Vert ^ {2} (\ left \ Vert \ mathbf {o} - \ mathbf {c} \ right \ Vert ^ {2} -r ^ {2})}}} {2 \ left \ Vert {\ hat {\ mathbf {u}}} \ right \ Vert ^ {2}}}}
Observe que é um vetor unitário e, portanto . Assim, podemos simplificar ainda mais para
você
^
{\ displaystyle {\ hat {\ mathbf {u}}}}
‖
você
^
‖
2
=
1
{\ displaystyle \ left \ Vert {\ hat {\ mathbf {u}}} \ right \ Vert ^ {2} = 1}
d
=
-
[
você
^
⋅
(
o
-
c
)
]
±
∇
{\ displaystyle d = - [{\ hat {\ mathbf {u}}} \ cdot (\ mathbf {o} - \ mathbf {c})] \ pm {\ sqrt {\ nabla}}}
∇
=
[
você
^
⋅
(
o
-
c
)
]
2
-
(
‖
o
-
c
‖
2
-
r
2
)
{\ displaystyle \ nabla = [{\ hat {\ mathbf {u}}} \ cdot (\ mathbf {o} - \ mathbf {c})] ^ {2} - (\ left \ Vert \ mathbf {o} - \ mathbf {c} \ right \ Vert ^ {2} -r ^ {2})}
Se , então, é claro que não existem soluções, ou seja, a linha não intercepta a esfera (caso 1).
∇
<
0
{\ displaystyle \ nabla <0}
Se , então, existe exatamente uma solução, ou seja, a linha apenas toca a esfera em um ponto (caso 2).
∇
=
0
{\ displaystyle \ nabla = 0}
Se , existem duas soluções e, portanto, a linha toca a esfera em dois pontos (caso 3).
∇
>
0
{\ displaystyle \ nabla> 0}
Veja também
Referências
<img src="https://en.wikipedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" title="" width="1" height="1" style="border: none; position: absolute;">