查看“︁数学/草稿-1”︁的源代码
来自康健生活
←
数学/草稿-1
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 通用公式 == <math> \overset{A matrix}{\begin{bmatrix} m \times n \end{bmatrix}} \times \overset{B matrix}{\begin{bmatrix} 1 \times n \end{bmatrix}} = \overset{Y matrix}{\begin{bmatrix} 1 \times m \end{bmatrix}} </math> 假设 <math>A * B = Y</math>。其中,A 为 <math>m * n</math> 的 m 行 n 列矩阵,B 为 <math>1 * n</math> 列的矩阵。B 拆分为<code>列向量</code>,并且列向量的<code>维数</code>就是矩阵的<code>行数</code>。 {{Warning|矩阵列数必须等于向量的维数么?eq: <math>\begin{bmatrix} 1 & 2 & 3 & 4 \\ a & b & c & d \\ \end{bmatrix} \times \begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \\ \end{bmatrix}</math>}} == 方法 == transform(a, b, c, d, e, f) 与 Matrix 的转换。 <math>\begin{bmatrix} x_{ 1 } \\ y_{ 1 } \\ 1 \\ \end{bmatrix} = \begin{bmatrix} a & c & e \\ b & d & f \\ 0 & 0 & 1 \\ \end{bmatrix} \times \begin{bmatrix} x \\ y \\ 1 \\ \end{bmatrix}</math> 推导出来 <math>\begin{cases} x_{ 1 } = a \times x + c \times y + 1 \times e \\ y_{ 1 } = b \times x + d \times y + 1 \times f \\ 1 = 0 \times 0 + 0 \times 0 + 1 \times 1 \\ \end{cases}</math> 简化后 <math>\begin{cases} x_{ 1 } = a \times x + c \times y + e \\ y_{ 1 } = b \times x + d \times y + f \\ \end{cases}</math> == 状态 == === 缩放 === <math>\begin{bmatrix} x_{ 1 } \\ y_{ 1 } \\ 1 \\ \end{bmatrix} = \begin{bmatrix} a & 0 & 0 \\ 0 & d & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \times \begin{bmatrix} x \\ y \\ 1 \\ \end{bmatrix}</math> 推导出来 <math>\begin{cases} x_{ 1 } = a \times x \\ y_{ 1 } = d \times y \\ \end{cases}</math> === 平移 === <math>\begin{bmatrix} x_{ 1 } \\ y_{ 1 } \\ 1 \\ \end{bmatrix} = \begin{bmatrix} 1 & 0 & e \\ 0 & 1 & f \\ 0 & 0 & 1 \\ \end{bmatrix} \times \begin{bmatrix} x \\ y \\ 1 \\ \end{bmatrix}</math> 推导出来 <math>\begin{cases} x_{ 1 } = e + x \\ y_{ 1 } = f + y \\ \end{cases}</math> === 旋转 === <math>\theta</math> 定义为弧度,并定义 <math>\beta</math> 为角度。则 <math>\theta</math> 值为 <math>\theta = \frac{\pi \times 180}{\beta}</math> <math>\begin{bmatrix} x_{ 1 } \\ y_{ 1 } \\ 1 \\ \end{bmatrix} = \begin{bmatrix} \cos{\theta} & -\sin{\theta} & 0 \\ \sin{\theta} & \cos{\theta} & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \times \begin{bmatrix} x \\ y \\ 1 \\ \end{bmatrix}</math> 推导出来 <math>\begin{cases} x_{ 1 } = \cos{\theta} \times x - \sin{\theta} \times y \\ y_{ 1 } = \sin{\theta} \times x + \cos{\theta} \times y \\ \end{cases}</math> ==== 假设 ==== 假设存在点 E 移动至点 F。设 E 坐标为(x1, y1),F 坐标为(x2, y2),D 坐标为(a, b)。 简要图示: [[文件:Transform-平移.png|500px|无|Transform-平移]] 初中数学: <math>\begin{cases} \cos\beta = \frac{x_{1} - a}{r} \\ \sin\beta = \frac{y_{1} - b}{r} \\ \cos\gamma = \frac{x_{2} - a}{r} \\ \sin\gamma = \frac{y_{2} - b}{r} \\ \end{cases}</math> 演算: <math>\begin{cases} \cos\beta = \frac{x_{1} - a}{r} \\ \sin\beta = \frac{y_{1} - a}{r} \\ x_{2} - a = \cos\gamma \times r = \cos(\beta - \alpha) \times r = (\cos\alpha \times \cos\beta + \sin\beta \times \sin\alpha) \times r \\ y_{2} - b = \sin\gamma \times r = \sin(\beta - \alpha) \times r = (\sin\beta \times \cos\alpha - \sin\alpha \times \cos\beta) \times r \\ \end{cases}</math> 推导: <math>\begin{cases} a = 0 \\ b = 0 \\ x_{2} = \cos\alpha \times (x_{1} - a) + \sin\alpha \times (y_{1} - b) + a = \cos\alpha \times x_{1} + \sin\alpha \times y_{1} \\ y_{2} = \cos\alpha \times (y_{1} - b) - \sin\alpha \times (x_{1} - a) +b = \cos\alpha \times y_{1} - \sin\alpha \times x_{1} \\ \end{cases}</math> 点旋转的角度 <math>\alpha</math> 是正旋转还是负旋转,当角度是负旋转时 <math>\theta = -\alpha</math>。 验证: <math>\begin{cases} x_{2} = \cos(\beta - (-\theta)) \times r = (\cos\beta \times \cos\theta - \sin\beta \times \sin\theta) \times r = \cos\alpha \times x_{1} - \sin\alpha \times y_{1} \\ y_{2} = \sin(\beta - (-\theta)) \times r = (\sin\theta \times \cos\beta + \sin\beta \times \cos\theta) \times r = \cos\alpha \times y_{1} + \sin\alpha \times x_{1} \\ \end{cases}</math>
返回
数学/草稿-1
。
导航菜单
康健生活
搜索
user-page
通知
user-interface-preferences
个人工具
登录
五一
多读书,多运动,多到远处走走,再看看不一样的世界。