ARTICLE DETAIL

资讯详情

深耕网站SEO优化与搜索引擎排名提升的一线实战洞察。

【Math】Vector Rotation

【Math】Vector Rotation 已知向量OP0→\overrightarrow{OP_0}OP0​​为(x0,y0)(x_0,y_0)(x0​,y0​)求旋转ϕ\phiϕ度后的坐标(x1,y1)(x_1,y_1)(x1​,y1​)由上图可知x1∣OP1→∣cos(θϕ)∣OP0→∣cos(θϕ)∣OP0→∣cosθ⋅cosϕ−∣OP0→∣sinθ⋅sinϕx0cosϕ−y0sinϕ\begin{aligned} x_1 |\overrightarrow{OP_1}| cos (\theta \phi) \\ |\overrightarrow{OP_0}| cos (\theta \phi) \\ |\overrightarrow{OP_0}| cos \theta \cdot cos\phi - |\overrightarrow{OP_0}| sin \theta \cdot sin\phi\\ x_0 cos\phi - y_0sin\phi \end{aligned}x1​​∣OP1​​∣cos(θϕ)∣OP0​​∣cos(θϕ)∣OP0​​∣cosθ⋅cosϕ−∣OP0​​∣sinθ⋅sinϕx0​cosϕ−y0​sinϕ​上述推导利用了∣OP0→∣∣OP1→∣|\overrightarrow{OP_0}| |\overrightarrow{OP_1}|∣OP0​​∣∣OP1​​∣以及三角函数的和差公式化积公式同理y1∣OP1→∣sin(θϕ)∣OP0→∣sin(θϕ)∣OP0→∣sinθ⋅cosϕ∣OP0→∣cosθ⋅sinϕy0cosϕx0sinϕ\begin{aligned} y_1 |\overrightarrow{OP_1}| sin (\theta \phi) \\ |\overrightarrow{OP_0}| sin (\theta \phi) \\ |\overrightarrow{OP_0}| sin \theta \cdot cos\phi |\overrightarrow{OP_0}| cos \theta \cdot sin\phi\\ y_0 cos\phi x_0sin\phi \end{aligned}y1​​∣OP1​​∣sin(θϕ)∣OP0​​∣sin(θϕ)∣OP0​​∣sinθ⋅cosϕ∣OP0​​∣cosθ⋅sinϕy0​cosϕx0​sinϕ​综上所述OP1→(x0cosϕ−y0sinϕ,x0sinϕy0cosϕ)\overrightarrow{OP_1} (x_0 cos\phi - y_0sin\phi, x_0sin\phi y_0 cos\phi )OP1​​(x0​cosϕ−y0​sinϕ,x0​sinϕy0​cosϕ)写成矩阵乘法的形式[cosϕ−sinϕsinϕcosϕ]⋅[x0y0][x1y1] \begin{bmatrix} cos \phi -sin\phi \\ sin\phi cos\phi \end{bmatrix} \cdot \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} \begin{bmatrix} x_1 \\ y_1 \end{bmatrix}[cosϕsinϕ​−sinϕcosϕ​]⋅[x0​y0​​][x1​y1​​]注二维旋转矩阵说明坐标变换的基本形式三维视图中的旋转可看作这一思想的扩展。注观察变换View Transformation用虚拟相机的位置和姿态决定从哪个视角观察三维点云。注投影变换Projection Transformation把三维场景映射到二维屏幕可采用透视投影或正交投影。
返回列表