浏览量:1,064

任意点与平面的反射矩阵

 

问题描述:设三维空间上,存在一个点\(V=\left( x,y,z \right)\),一个平面\(\Gamma :P\cdot \vec{n}+d=0\),求点\(V\)经过平面\(\Gamma \)的投影点\(V'\),其中,\(V'=\left( x',y',z' \right)\)\(\vec{n}=\left( {{n}_{x}},{{n}_{y}},{{n}_{z}} \right)\),如图1所示。

2016-9-24-17-07-31

图1. 点\(V'\)是点\(V\)经过平面\(\Gamma \)的投影点

\(l\)表示点\(V\)到平面\(\Gamma \)的有向距离,则有:

\(l=\frac{V\cdot \vec{n}+d}{\left\| {\vec{n}} \right\|} \tag{1}\)

由于点\(V\)和点\(V'\)到平面\(\Gamma \)的距离大小相等,且\(\overline{VV'}\)垂直于平面\(\Gamma \),则有:

\(V-V'=2l\cdot \frac{{\vec{n}}}{\left\| {\vec{n}} \right\|} \tag{2}\)

把(1)代入(2)式中,得到:

\(V'=V-\frac{2\vec{n}\left( V\cdot \vec{n}+d \right)}{{{\left\| {\vec{n}} \right\|}^{2}}}=V-\frac{2\left( V\cdot \vec{n} \right)\vec{n}}{{{\left\| {\vec{n}} \right\|}^{2}}}-\frac{2d\vec{n}}{{{\left\| {\vec{n}} \right\|}^{2}}} \tag{3}\)

设点\(V\)和点\(V'\)分别用齐次坐标表示(参见《齐次表示》),则\(V={{\left( x,y,z,1 \right)}^{T}}\)\(V'={{\left( x',y',z',1 \right)}^{T}}\),那么等式(3)可以表示成齐次矩阵与齐次坐标乘积的形式,即\(V'=M\cdot V\),则为:

 

\[\left( {\begin{array}{*{20}{c}}{x'}\\{y'}\\{z'}\\1\end{array}} \right) = \left( {\begin{array}{*{20}{c}}{1 - \frac{{2n_x^2}}{{{{\left\| {\vec n} \right\|}^2}}}}&{ - \frac{{2{n_x}{n_y}}}{{{{\left\| {\vec n} \right\|}^2}}}}&{ - \frac{{2{n_x}{n_z}}}{{{{\left\| {\vec n} \right\|}^2}}}}&{ - \frac{{2{n_x}d}}{{{{\left\| {\vec n} \right\|}^2}}}}\\{ - \frac{{2{n_y}{n_x}}}{{{{\left\| {\vec n} \right\|}^2}}}}&{1 - \frac{{2n_y^2}}{{{{\left\| {\vec n} \right\|}^2}}}}&{ - \frac{{2{n_y}{n_z}}}{{{{\left\| {\vec n} \right\|}^2}}}}&{ - \frac{{2{n_y}d}}{{{{\left\| {\vec n} \right\|}^2}}}}\\{ - \frac{{2{n_z}{n_x}}}{{{{\left\| {\vec n} \right\|}^2}}}}&{ - \frac{{2{n_z}{n_y}}}{{{{\left\| {\vec n} \right\|}^2}}}}&{1 - \frac{{2n_z^2}}{{{{\left\| {\vec n} \right\|}^2}}}}&{ - \frac{{2{n_z}d}}{{{{\left\| {\vec n} \right\|}^2}}}}\\0&0&0&1\end{array}} \right) \cdot \left( {\begin{array}{*{20}{c}}x\\y\\z\\1\end{array}} \right) \tag{4}\]

spacer

Leave a reply