Image not available

396x258

Untitled-1.png

🧵 Untitled Thread

Anonymous No. 16474310

Math thread, let's share and discuss interesting math.

Did you know that a dot product can be used to calculate the angle between vectors as well as calculate the projection of one vector onto another. This is particularly useful in computer graphics and physics.

Anonymous No. 16474354

>>16474310
>Did you know that a dot product can be used to calculate the angle between vectors as well as calculate the projection of one vector onto another.
No, how so

Anonymous No. 16474374

>>16474354
a⋅b=∥a∥∥b∥cosθ = a1b1+a2b2

This extends into 3 or more dimensions, pretty neat!

Anonymous No. 16474772

>>16474374
Whats the dot, what's the product?

Anonymous No. 16474774

>>16474310
>as well as calculate the projection of one vector onto another.
Whats that mean

Anonymous No. 16475053

>>16474774
if you look at the picture it's projecting a along b, so for instance if you wanted to know the intensity light was hitting a surface at you could project the direction of the light source onto the surface normal and use the result as part of the calculation to color the fragment

Anonymous No. 16475067

>>16474310
Yes in high school we learnt that

Anonymous No. 16475105

>>16475053
not every vectorspace comes equipped with an inner product

Anonymous No. 16475117

>>16475105
At this level noone knows what a vector space is

Anonymous No. 16475182

>>16475067
>>16475117
wow i guess my math isn't advanced enough for you. you must be really smart

Image not available

300x168

1714320981503527.png

Anonymous No. 16475215

>>16474310
Now explain why you can compute that by doing pic related

Image not available

80x80

1716960921131081.jpg

Anonymous No. 16475242

>>16475215
start with law of brosines
[math]\| \vec{b} - \vec{a} \|^2 = \|\vec{a}\|^2 + \|\vec{b}\|^2 - 2 \| \vec{a}\| \|\vec{b}\| \cos \theta [/math]

expand dong on left side
[math]\| \vec{b} - \vec{a} \|^2 = \sum_i [b_i - a_i]^2 = \sum_i b_i^2 - 2 \sum_i a_i b_i + \sum_i a_i^2 = \|\vec{b}\|^2 - 2 \sum_i a_i b_i + \|\vec{a}\|^2[/math]

forcefully insert imto first equation and cancel terms to get
[math]\sum_i a_i b_i = \|\vec{a}\| \|\vec{b}\| \cos \theta[/math]

define dot product as
[math]\vec{a} \cdot \vec{b} \equiv \|\vec{a}\|\|\vec{b}\|\cos\theta[/math]

Anonymous No. 16475711

>>16474310
You need to take the arccosine to find the angle, which can be a slow computation. Might be more efficient to express angles as rotation matrices instead, depends on your application.

Anonymous No. 16475718

>>16475105
When you work with computer graphics you can generally impose a euclidean metric, which generates an inner product at every point in the space.

Anonymous No. 16475751

retard here:
What is the simplest way to obtain the golden ratio? I mean, plotting and all that.