학교수업/수치해석

[Numerical Analysis] 1. Vector, Line, Plane

hwijin97 2022. 5. 19. 15:57

 

Coordiante System


n-dimensional coordinate system : $ R^n = { ( a_1, a_2, \cdots , a_n ) | a_1, a_2, \cdots , a_n \in R } $

$A = (a_1, a_2, \cdots, a_n) $, $B = (b_1, b_2, \cdots, b_n)$

각 벡터끼리 합, 차, 상수배는 각 원소의 합, 차, 상수배이다.

 

벡터의 구성요소 : Length + Direction

$\vec{a} = (a_1, a_2, \cdots, a_n)$, $a = \begin{bmatrix} a_1 & a_2 & \cdots & a_n \\ \end{bmatrix} $

 

$\vec{a} = (3,4)$

length : $| \vec{a} | = \sqrt{3^2+4^2} = 5 $

direction : $\frac{\vec{a}}{|\vec{a}|} = (\frac{3}{5}, \frac{4}{5} $ (unit vector)

 

Free vector : Translation is allowed ( 움직여도 동일한 벡터로 취급. )

Fixed vector : Starting point is fixed (origin), translation is limited ( 시작점이 원점에 고정되고, 움직일 수 없음 )

 

Commutative law, Associative law, Distributive law 성립

 


Dot Product ( scalar product, inner product )

 

$ \vec{a} \cdot \vec{b} = a_1b_1 + a_2b_2 + \cdots + a_nb_n$

$ \vec{a} \cdot \vec{a} = |\vec{a}|^2 $

$\vec{a} \cdot \vec{b} = |\vec{a}|\vec{b}| \cos \theta $

$\vec{a} \cdot \vec{b} = 0 $, Perpendicular

 

Cross Product (vector product ) Only 3D vector!

$\vec{a} \times \vec{b} = \begin{pmatrix} a_2b_3=a_3b_2 & a_3b_1 - a_1b_3  &  a_1b_2 - a_2b_1 \\ \end{pmatrix} $

$ \vec{c} = \vec{a} \times \vec{b} $ is Percendicular to $\vec{a}, \vec{b} $

$ \vec{a} \times \vec{b} = 0$, Parallel

$ \vec{a} \times \vec{b} = -(\vec{b} \times \vec{a}) \neq \vec{b} \times \vec{a} $ 

$| \vec{a} \times \vec{b} | = |\vec{a}||\vec{b}| \sin \theta $

- Direction follows right hand rule

 

Linear Independent

$ \vec{x_1}, \vec{x_2}, \cdots, \vec{x_n}$ is linearly independent,

iff $a_1 \vec{x_1} + a_2 \vec{x_2} + \cdots + a_n \vec{x_n} = 0$ only if $a_1, a_2, \cdots, a_n$ are all 0

if there is a solution that any of $a_1, a_2, \cdots, a_n$ is non-zero, linearly dependent

- at least one vector can be represented with a linear combination of other vector, linearly dependent

- Dimension of vectors : size of largest linearly independent set

 

 

Basis Vector : Linearly Independent

N-dimensional basis vector can make n-dimensional coordinate system

 

$\vec{a} = a \vec{e_1} + b \vec{e_2}$, Any point is represented by a linear combination of basis vector


Line

determine a unique line : two points, one point + one direction

$y = mx + b$, $m =\frac{y_2 - y_1}{x_2 - x_1} = \frac{y - y_1}{x - x_1} = \frac{y - y_2}{x - x_2} $

 

Parametric representation

$x = au + b$, $y = cu+d$, $u$ : independent variable

$u=0  \to x_1 = b, y_1 = d$, $u=1 \to x_2 = a+b = a + x_1, x_2 = c+d=c+y_1$

$ x = (x_2 - x_1)u + x_1, y = (y_2 - y_1) u + y_1$

$x - x_1 = (x_2 - x_1)u, y- y_1 = (y_2 - y_1)u$

$u = \frac{x-x_1}{x_2-x_1} = \frac{y-y_1}{y_2-y_1}$

 

Line in 3D

$x = a_x u + b_x, y = a_ u +b_y, z = a_zu+b_z$

 

Line segment

in parametric representation -> change $u$

 

Representing Lines in Vector

$\vec{x} = (x,y,z), \vec{a} = (a_x, a_y, a_z), \vec{b} = (b_x, b_y, b_z) \to \vec{x} = \vec{a} u + \vec{b}$ : vector addition

 

Line 위의 두점 $p_0, p_1$ 의 벡터 $\vec{p_1}, \vec{p_2}$ 에서 Line direction vector $ = \vec{p_1} - \vec{p_0}$

$ \vec{x} = \vec{p_0} + (\vec{p_1} - \vec{p_0}) u$

 

Point : $\vec{p_0} = (p_x, p_y, p_z)$

Line : \vec{x} = \vec{a} u + \vec{b}$

$u = \frac{x - b_x}{a_x} = \frac{y - b_y}{a_y} = \frac{z -b_z}{a_z}$

$u_x = \frac{p_x - b_x}{a_x}, u_y = \frac{p_y-b_y}{a_y}, u_z = \frac{p_z-b_z}{a_z}$

$u_x = u_y = u_z \to \vec{p_0}$ is on the line

 

Point and Line

$|u_x - u_y| < \epsilon \wedge |u_y - u_z| < \epsilon \wedge |u_z - u_x| < \epsilon$, $\epsilon << 1$

 

$f(x,y) = ax + by + c$,

$f(x_0, y_0) = 0 \to $ on line

$f(x_0, y_0), f(x_1, y_1)$ : same sign : same side

$f(x_0, y_0), f(x_1, y_1)$ : different sign : different side

 

 


Plane

determines a unique plane : Three non-collinear points, A point and a direction

$ax+by+cz+d = 0$ $c = 0 \to$ Line in 2D, but Place in 3D

$z = - \frac{d}{c}, a = b = 0$ : Place  perpendicular with z axis

 

$d \neq 0$, $a' = \frac{a}{d} , b' = \frac{b}{d} , c' = \frac{c}{d}$ : 4 unknown -> 3 unknown

-> need 3 point

 

A Point and Two vector : 

$\vec{x} = \vec{x_0} + u\vec{s} + w\vec{t}$

 

Three points :

$\vec{x} = \vec{x_0} + u(\vec{x_1} - \vec{x_0}) + w(\vec{x_2} - \vec{x_1})$

 

A Point and a Normal vector :

- Normal vector : perpendicular to any vector on the plane

$\vec{l_i} \cdot \vec{n} = 0 $

$(\vec{x} - \vec{x_0}) \cdot \vec{n} = \vec{x} \cdot \vec{n} - \vec{x_0}\cdot \vec{n} = 0 $

 

 

Normal Vector 

- A vector perpendicular to the plane : $\vec{n} = \vec{s} \times \vec{t}$

- Unet normal Vector : $\hat{n} = \vec{n} / |\vec{n}|$

- $(\vec{x} - \vec{x_0}) \cdot \hat{n} = 0$

 

Points and Planes

$f(x,y,z) = ax+by+cz+d$, can compare sign and sides

 

Lines and Planes

line : $\vec{x} = \vec{a}u+\vec{b}$

plane : $(\vec{x} - \vec{x_0}) \cdot \vec{n} = 0$

 

(\vec{a}u + \vec{b} - \vec{x_0}) \cdot \vec{n} = 0$

$ u = =\frac{(\vec{b} - \vec{x_0}) \cdot \vec{n} }{\vec{a} \cdot \vec{n}} $

- $\vec{a} \cdot \vec{n} \neq 0 $ : Intersect at a point

- $\vec{a} \cdot \vec{n} = 0 $ : Parallel -> $(\vec{b} - \vec{x_0}) \cdot \vec{n} = 0$ : Line on the plane, $\neq$ : No intersection

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

'학교수업 > 수치해석' 카테고리의 다른 글

[Numerical Analysis] 6. Rendering  (0) 2022.05.20
[Numerical Analysis] 5. Surface  (0) 2022.05.20
[Numerical Analysis] 4. Curve  (0) 2022.05.20
[Numerical Analysis] 3. Transformation  (0) 2022.05.19
[Numerical Analysis] 2. Matrix  (0) 2022.05.19