数学/草稿-1:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
 
(未显示同一用户的47个中间版本)
第1行: 第1行:
== 通用公式 ==
== 引言 ==
假设 <math>A * B = Y</math>。其中,A 为 <math>m * n</math> 的 m 行 n 列矩阵,B 为 <math>1 * n</math> 列的矩阵。B 拆分为<code>列向量</code>,并且列向量的<code>维数</code>就是矩阵的<code>行数</code>。
在使用 css 样式进行样式的缩放、旋转等设置时,思考了一下它的较浅层的原理,恩,这个阶段都是一些初高的数学计算,从新看这里的时候顺便捡了捡初高中的数学,比如三角函数之类。
 
{{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>}}


== 状态 ==
== 状态 ==
=== 缩放 ===
== 齐次坐标系 ==
 
<math>\begin{bmatrix}
x_{ 1 } \\
y_{ 1 } \\
1 \\
\end{bmatrix} = \begin{bmatrix}
a & 0 & 0 \\
0 & b & 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 & a \\
0 & 1 & b \\
0 & 0 & 1 \\
\end{bmatrix} \times \begin{bmatrix}
x \\
y \\
1 \\
\end{bmatrix}</math>
 
推导出来
 
<math>\begin{cases}
x_{ 1 } = a + x \\
y_{ 1 } = d + y \\
\end{cases}</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>

2023年8月7日 (一) 08:47的最新版本

引言

在使用 css 样式进行样式的缩放、旋转等设置时,思考了一下它的较浅层的原理,恩,这个阶段都是一些初高的数学计算,从新看这里的时候顺便捡了捡初高中的数学,比如三角函数之类。

状态

齐次坐标系