🧵 Untitled Thread
Anonymous at Thu, 14 Nov 2024 03:38:37 UTC 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 at Thu, 14 Nov 2024 04:54:15 UTC 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 at Thu, 14 Nov 2024 05:27:36 UTC No. 16474374
>>16474354
a⋅b=∥a∥∥b∥cosθ = a1b1+a2b2
This extends into 3 or more dimensions, pretty neat!
Anonymous at Thu, 14 Nov 2024 14:05:06 UTC No. 16474772
>>16474374
Whats the dot, what's the product?
Anonymous at Thu, 14 Nov 2024 14:06:07 UTC No. 16474774
>>16474310
>as well as calculate the projection of one vector onto another.
Whats that mean
Anonymous at Thu, 14 Nov 2024 18:49:24 UTC 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 at Thu, 14 Nov 2024 19:01:47 UTC No. 16475067
>>16474310
Yes in high school we learnt that
Anonymous at Thu, 14 Nov 2024 19:31:18 UTC No. 16475105
>>16475053
not every vectorspace comes equipped with an inner product
Anonymous at Thu, 14 Nov 2024 19:41:46 UTC No. 16475117
>>16475105
At this level noone knows what a vector space is
Anonymous at Thu, 14 Nov 2024 20:16:30 UTC No. 16475182
>>16475067
>>16475117
wow i guess my math isn't advanced enough for you. you must be really smart
Anonymous at Thu, 14 Nov 2024 20:42:29 UTC No. 16475215
>>16474310
Now explain why you can compute that by doing pic related
Anonymous at Thu, 14 Nov 2024 21:23:53 UTC 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[/m
Anonymous at Fri, 15 Nov 2024 04:54:28 UTC 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 at Fri, 15 Nov 2024 04:56:41 UTC 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 at Fri, 15 Nov 2024 06:00:49 UTC No. 16475751
retard here:
What is the simplest way to obtain the golden ratio? I mean, plotting and all that.