Skip to content
The Chat Archive
gpt-3.5-turbo-0301· OpenAI WildChat-4.8M (AI2)

将一幅图x方向平移2个像素,y方向平移三个像素,之后顺时针旋转30°,求他的刚性变换矩阵T

  1. User

    将一幅图x方向平移2个像素,y方向平移三个像素,之后顺时针旋转30°,求他的刚性变换矩阵T

  2. Assistant

    先进行平移变换,然后进行旋转变换。因为刚性变换中平移和旋转是独立的,所以两个变换可以分开计算,最后将两个变换的矩阵相乘就是总的刚性变换矩阵T。

    平移变换矩阵为:

    [102013001]\begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & 3 \\ 0 & 0 & 1 \end{bmatrix}

    旋转变换矩阵为:

    [cos⁡θ−sin⁡θ0sin⁡θcos⁡θ0001]\begin{bmatrix} \cos \theta & -\sin \theta & 0 \\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{bmatrix}

    其中,θ\theta为旋转角度,题目中要求顺时针旋转30°,所以θ=−30°\theta = -30°

    将两个矩阵相乘得到总的刚性变换矩阵T:

    T=[cos⁡(−30°)−sin⁡(−30°)2sin⁡(−30°)cos⁡(−30°)3001]=[32122−12323001]T = \begin{bmatrix} \cos(-30°) & -\sin(-30°) & 2 \\ \sin(-30°) & \cos(-30°) & 3 \\ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} \frac{\sqrt{3}}{2} & \frac{1}{2} & 2 \\ -\frac{1}{2} & \frac{\sqrt{3}}{2} & 3 \\ 0 & 0 & 1 \end{bmatrix}

    因此,所求的刚性变换矩阵T为:

    [32122−12323001]\begin{bmatrix} \frac{\sqrt{3}}{2} & \frac{1}{2} & 2 \\ -\frac{1}{2} & \frac{\sqrt{3}}{2} & 3 \\ 0 & 0 & 1 \end{bmatrix}

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.