[컴퓨터그래픽스] Geometric Objects and Its representations

Serun1017·2024년 10월 23일
0

컴퓨터그래픽스

목록 보기
21/31

Scalars

  • Scalars α,β,γ\alpha, \beta, \gamma from a scalar field
  • Operations α+β\alpha + \beta, αβ\alpha \cdot \beta , 00, 11, α-\alpha, ()1()^{-1}

Vectors

  • Vectors u,v,wu, v, w from a vector space
  • Vector addition u+vu + v, subtraction uvu - v
  • Zero vector 00
  • Scalar multiplication αv\alpha v

Vectors.png

Lines and line Segments

  • Parametric form of line: P(α)=P0+αdP(\alpha) = P_0 + \alpha d
  • Line segment between QQ and RR: P(α)=(1α)Q+αRP(\alpha) = (1 - \alpha) Q + \alpha R for  0α1for \; 0 \leq \alpha \leq 1

Lines and line Segments.png

Dot Product (Projection)

  • Dot Product projects one vector onto another vector
  • uv=u1v1+u2v2+u3v3=uvcos(θ)u \cdot v=u_1 v_1+ u_2 v_2 + u_3 v_3 = |u||v|\cos(\theta)
  • prvu=(uv)v/v2pr_vu = (u \cdot v)v/{|v|}^2

Dot Product (Projection).png

Cross Product

  • a×b=absin(θ)|a \times b| = |a||b||\sin(\theta)|
    (a1a2a3)×(b1b2b3)=(a2b3a3b2a3b1a1b3a1b2a2b1)\begin{pmatrix}a_1 \\ a_2 \\a_3\end{pmatrix} \times \begin{pmatrix}b_1 \\ b_2 \\ b_3\end{pmatrix} = \begin{pmatrix}a_2b_3 - a_3b_2 \\ a_3b_1 - a_1b_3 \\ a_1b_2 - a_2b_1\end{pmatrix}
  • Cross product is perpendicular to both aa and bb

Cross Product.png

  • Right- hand rule

Cross Product_right-handle rule.png

Planes

  • A Plane can be defined by a point and two vectors or by three points
  • P(α,β)=R+αu+βvP(\alpha, \beta) = R + \alpha u + \beta v

Planes_1.png

  • P(α,β)=R+α(QR)+β(PQ)P(\alpha, \beta) = R + \alpha(Q - R) + \beta(P - Q)

Planes_2.png

Planes and normal

  • Plane defined by Point P0P_0 and vectors uu and vv
  • uu and vv should not be parallel
  • Parametric form: T(α,β)=P0+αu+βvT(\alpha, \beta) = P_0 + \alpha u + \beta v (α\alpha and β\beta are scalars)
  • n=u×v/u×vn = u \times v / |u \times v| is the normal
  • n(PP0)=0n \cdot (P - P_0) = 0 if and only if PP lies in plane

Planes and normal.png

0개의 댓글