블로그 이미지
앨리삵

앨리삵입니다.

Rss feed Tistory
Graphics Note 2015.07.06 10:33

Ellipse

Paul Heckbert의 학위논문 'Fundamentals of Texture Mapping and Image Warping' 의 부록, 타원부분 요점 정리.

Anisotropic Gaussian filtering을 이해하기 위한 기반 지식이다.


Ellipses

- The implicit equation for a conic is a second order polynomial in two variables: [math]Ax^2 + By^2 + Cy^2 + Dx + Ey - F = 0[/math]

- The conic is ellipse when [math]AC-B^2/4 > 0[/math]

- Conic centered on origin, i.e., the ellipse : [math]Ax^2 + Bxy + Cy^2 = F[/math]

-The conic equation can be written in matrix form

[math!] pQp^T = \begin{bmatrix} x \\ y  \end{bmatrix} \begin{bmatrix} A & B/2 \\ B/2 & C \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = F [/math!]


Transforming

- 2x2 linear transformation matrix [math]M, p=p'M[/math]

- conic [math]A'x^2 + B'xy + C'y^2 = F'[/math] can be transformed to [math]Ax^2 + Bxy + Cy^2 = F[/math]

- it is found by substituting [math]p' = pM^{-1},[/math]

[math!]p'Q'p'^T = F', where Q' = \begin{bmatrix}A' & B'/2 \\ B'/2 & C'\end{bmatrix}[/math!]

[math!]pM^{-1}Q'(pM^{-1})^T = pM^{-1}Q'M^{-1T}p^T = F = F'[/math!]

[math!]Q = M^{-1} Q' M^{-1T}[/math!]



- Orthogonal ellipse equation : [math]\left( \frac{x}{a} \right)^2 + \left( \frac{y}{b}\right)^2 = 1[/math]

- from this, [math]A' = \frac{1}{a^2}, B' = 0, C' = \frac{1}{b^2}, F' = 1 \rightarrow Q'=\begin{bmatrix}A' & 0 \\ 0 & C'\end{bmatrix}[/math]



- Rotated ellipse, [math] M = \begin{bmatrix} cos\theta & sin\theta \\ -sin\theta & \cos\theta \end{bmatrix}[/math]


[math!] Q = M^{-1}Q'M^{-1T} = \begin{bmatrix}cos\theta & -sin\theta \\ sin\theta & cos\theta \end{bmatrix} \begin{bmatrix}A'&0\\0&C'\end{bmatrix} \begin{bmatrix}cos\theta & sin\theta \\ -sin\theta & cos\theta \end{bmatrix} = \begin{bmatrix}A & B/2 \\ B/2 & C\end{bmatrix}[/math!]


[math!]\begin{aligned} A=A'cos^2\theta + C'sin^2\theta \\ B = (A'-C')sin2\theta \\ C=A'sin^2\theta + C'cos^2\theta \\ F = F' = 1 \end{aligned}[/math!]


- Ellipse by transforming circle

[math!]Q'=\begin{bmatrix}1&0\\0&1\end{bmatrix}, ~ M=\begin{bmatrix}a&0\\0&b\end{bmatrix} \begin{bmatrix}cos\theta & sin\theta \\ -sin\theta & cos\theta \end{bmatrix} = \begin{bmatrix}acos\theta & asin\theta \\ -bsin\theta & bcos\theta \end{bmatrix}[/math!]


- Parametric ellipse equation: unit circle [math]p(t) = \begin{bmatrix}x(t)&y(t)\end{bmatrix} = \begin{bmatrix}cost&sint\end{bmatrix}[/math]

[math!]p' = pM_s M_r = \begin{bmatrix}cost&sint\end{bmatrix}\begin{bmatrix}a&0\\0&b\end{bmatrix}\begin{bmatrix}cos\theta & sin\theta \\ -sin\theta & cos\theta \end{bmatrix} = ...[/math!]

저작자 표시 비영리 변경 금지
신고
TOTAL 297,535 TODAY 42

티스토리 툴바