Math

Vector inner dot product, Scalar projection, Vector projection, Lambertian reflection

Naranjito 2024. 9. 24. 16:23
  • Vector inner dot product

 

Given two vectors of the same dimension, each component of the vector is multiplied and then added to create a scalar value.

 

u = ( a , b ) v = ( c , d ) u v = a c + b d
( x , y ) ( x , y ) = x 2 + y 2 v v = | v | 2
( u + v ) ( u + v ) = u u + v v + 2 ( u v ) = | u | 2 + | v | 2 + 2 ( u v )
  • Relationship between Vector inner dot product and Rrigonometric

 

u v = | u | | v | cos ( θ )

b = a c
| b | 2 = b b = ( a c ) ( a c ) = | a | 2 + | c | 2 2 a c
| b | 2 = | c | 2 sin 2 ( θ ) = ( | a | | c | cos ( θ ) ) 2 + | c | 2 sin 2 ( θ ) ( ( | a | | c | cos ( θ ) ) = 0 ) = | a | 2 2 | a | | c | cos ( θ ) + | c | 2 cos 2 ( θ ) + | c | 2 sin 2 ( θ ) = | a | 2 + | c | 2 2 | a | | c | cos ( θ )
| a | 2 + | c | 2 2 a c = | a | 2 + | c | 2 2 | a | | c | cos ( θ ) a c = | a | | c | cos ( θ ) u v = cos ( θ ) ( where,  | u | = 1 , | v | = 1 )

 


  • Scalar projection

 

The distance (size) from the starting point to the projected point.

 

cos θ = adj hyp = adj | s | adj = | s | cos θ r s = | r | | s | cos θ adj = | s | cos θ = r s | r | = r ^ s In here, $$\hat{r}=\frac r{|r|}$$
  • Vector projection

 

The vector from the starting point to the projected point.

 

 

vector projection = scalar projection × unit vector = r s | r | r | r | = r s | r | | r | r = r s r r r
vector projection = scalar projection × unit vector = r s | r | r | r | = ( r ^ s ) r ^

 

projected to

It means that has the length from onto the direction perpendicular to , and finding a vector that has the same direction as .

: is represented the vector that onto the direction perpendicular to .

p : variable
( b p a ) T a = 0 b T a p a T a = 0 p = b T a a T a x = p a = b T a a T a a x = p a = ( b T a ) a
  • Lambertian reflection

 

 

When a light source emits direct sunlight toward an object, the intensity of the light reflected on the surface of the light is proportional to the cos(θ) function of the angle between the two vectors.


N ^ L ^ = cos ( θ ) N ^ : Vector in the direction the surface is facing

L ^ : Vector from surface to light source

 

https://gaussian37.github.io/math-la-projection/

'Math' 카테고리의 다른 글

Matrix Multiplication  (0) 2024.09.26
Unit Vector VS Vector  (0) 2024.09.26
arc, chord, diameter, crescent, sector, central angle  (0) 2024.07.11
Intercept  (0) 2024.06.24
How to calculate the number easily, fastly  (0) 2024.04.02