# 仿射变换

|

## 基本变换

### 缩放

$$M = \begin{bmatrix} 1 & 0 \\\\ 0 & 1 \end{bmatrix}$$
$$M = \begin{bmatrix} 2 & 0 \\\\ 0 & 2 \end{bmatrix}$$
$$M = \begin{bmatrix} 1 & 0 \\\\ 0 & 2 \end{bmatrix}$$

### 反射

$$M = \begin{bmatrix} 1 & 0 \\\\ 0 & 1 \end{bmatrix}$$
$$M = \begin{bmatrix} -1 & 0 \\\\ 0 & 1 \end{bmatrix}$$
$$M = \begin{bmatrix} 1 & 0 \\\\ 0 & -1 \end{bmatrix}$$

### 剪切

$$M = \begin{bmatrix} 1 & 0 \\\\ 0 & 1 \end{bmatrix}$$
$$M = \begin{bmatrix} 1 & 1 \\\\ 0 & 1 \end{bmatrix}$$

### 旋转

$\begin{bmatrix} 1 \\\\ 0 \end{bmatrix} \Rightarrow \begin{bmatrix} \cos(\theta) \\\\ \sin(\theta) \end{bmatrix}$ $\begin{bmatrix} 0 \\\\ 1 \end{bmatrix} \Rightarrow \begin{bmatrix} -\sin(\theta) \\\\ \cos(\theta) \end{bmatrix}$

## Homogeneous Coordinates

$$M = \begin{bmatrix} a & b & t_x \\\\ c & d & t_y \\\\ 0 & 0 & 1 \end{bmatrix}$$

## Reference

Disclaimer: This is a personal weblog. The opinions expressed here represent my own and not those of any entity with which I have been, am now, or will be affiliated.