詳細情報:Line–line intersection§Formulas

skewnessEdit

スキューラインのペアの各行が通過する二つの点によって定義されている場合、これらの四つの点は同一平面上であってはならないため、非ゼロボリュームの四面体の頂点でなければならない。 逆に、非零体積の四面体を定義する任意の二つの点対はまた、スキューラインのペアを定義します。 したがって、二つの点の対がスキューラインを定義するかどうかのテストは、四面体の体積に対する公式をその四つの頂点に関して適用することである。, ある点を1×3のベクトルaとして表し、他の点についても同様にb、c、dを表し、aとbを通る線がcとdを通る線に歪んでいるかどうかを確認するには、四面体の体積式がゼロでない結果を与えるかどうかを確認することができる。

V=1 6|det|。 {\displaystyle V={\frac{1}{6}}\left|\det\left\right|。,}

Nearest pointsEdit

も参照してください:線–線の交点§スキュー線への最も近い点
も参照してください:三角測量(コンピュータビジョン)§中点法

二つの線をベクトルとして表現する:

Line1:v1=p1+t1d1{\displaystyle{\text{Line1:}}\;\mathbf{v_{1}}=\mathbf{p_{1}}+t_{1}\mathbf{d_{1}}}line2:v2=p2+t2d2{\Displaystyle{\text{line2:}}\;\mathbf{V_{2}}=\mathbf{p_{2}}+t_{2}\mathbf{d_{2}}}

d1{\displaystyle\mathbf{d_{1}}}とd2{\displaystyle\mathbf{d_{2}}}の外積は直線に垂直である。,t \mathbf {n_{2}} }{\mathbf {d_{1}} \cdot \mathbf {n_{2}} }}\mathbf {d_{1}} }

Similarly, the point on Line 2 nearest to Line 1 is given by (where n 1 = d 1 × n {\displaystyle \mathbf {n_{1}} =\mathbf {d_{1}} \times \mathbf {n} } )

c 2 = p 2 + ( p 1 − p 2 ) ⋅ n 1 d 2 ⋅ n 1 d 2 {\displaystyle \mathbf {c_{2}} =\mathbf {p_{2}} +{\frac {(\mathbf {p_{1}} -\mathbf {p_{2}} )\cdot \mathbf {n_{1}} }{\mathbf {d_{2}} \cdot \mathbf {n_{1}} }}\mathbf {d_{2}} }

Now, c 1 {\displaystyle \mathbf {c_{1}} } and c 2 {\displaystyle \mathbf {c_{2}} } form the shortest line segment joining Line 1 and Line 2.,

DistanceEdit

The distance between nearest points in two skew lines may be expressed using vectors:

x = a + λ b ; {\displaystyle \mathbf {x} =\mathbf {a} +\lambda \mathbf {b} ;} y = c + μ d . {\displaystyle \mathbf {y} =\mathbf {c} +\mu \mathbf {d} .,}

ここで、1×3ベクトルxは特定の点aを通る線上の任意の点を表し、bはその線の方向を表し、その点が線上のどこにあるかを決定する実数λ{\displaystyle\lambda}の値を持ち、同様にd方向の特定の点cを通る線上の任意の点yに対しても同様である。,

bとdのクロス積は、単位ベクトルと同様に直線に垂直である

n=b×d|b×d|{\displaystyle\mathbf{n}={\frac{\mathbf{b}\times\mathbf{d}}{|\mathbf{b}\times\mathbf{d}|}}}

直線間の距離は

d=|n∞(c−a)|である。 {\displaystyle d=|\mathbf{n}\cdot(\mathbf{c}-\mathbf{a})|.}

(|b×d/がゼロの場合、線は平行であり、この方法は使用できません)。