線性代數-座標轉換筆記

  1. 旋轉證明

假設紅線端點座標為 $ (x1,y1) $
假設藍線端點座標為 $ (x,y) $
紅線與藍線之夾角為 $ \theta $
籃線與 $X$ 軸之夾角為 $ a $
長度為 $ r $
則得到
$ x1 = x \cos \theta - y \sin \theta $
$ y1 = x \sin \theta + y \cos \theta $
證明如下:

經由畢氏定理得知:
$ x = r \cos a $
$ y = r \sin a $

$ x1 = r \cos (\theta + a) = r \cos \theta \cos a - r \sin \theta \sin a $
$ y1 = r \sin (\theta + a) = r \sin \theta \cos a + r \sin a \cos \theta $

$ x1 = r \cos \theta \cos a - r \sin \theta \sin a = x \cos \theta - y \sin \theta $
$ y1 = r \sin \theta \cos a + r \sin a \cos \theta = x \sin \theta + y \cos \theta $

備註:
$ r \cos a = x $
$ r \sin a = y $

因此得證:
$ x1 = x \cos \theta - y \sin \theta $
$ y1 = x \sin \theta + y \cos \theta $