I need help. Not mentally, mathematically. Basically in this post it stated that cos theta was equal to the dot product of the two unit vectors in this example:
I have only used sin cos and tan when working out a side of a triangle and not much else. It got me thinking, what does cos/sin/tan multiplied by a number actually mean, and is the purpose of it existing?
All I know is it has to do with the angles - angle of depression, angle of elevation, bearings, etc.
They help to find unknown side lengths or angles in triangles, if that makes sense.
Cosine represents the ratio between a triangle’s adjacent side and its hypotenuse given an angle theta. Multiplying sin/cos/tan of an angle by a number allows you to find specific side lengths of triangles. For instance: multiplying the cosine of an angle by the length of the hypotenuse gives you the length of the adjacent side, since A/H * H = A
.
That’s not what the diagram is saying. It’s saying that vector U (blue) times vector V (red) is equal to the cosine of the angle between vectors U and V. I believe that you can then use the inverse function of cosine (arc-cosine) to get the angle between the two vectors.
Cosine in its “purest” math form is the x position of a circle of radius 1 at angle θ
As shown below:
When you multiply cosine by a value, you change it from a circle of radius 1 to a circle of radius (value)
For example, cos(θ) * 2 gets the x position of a circle at radius 2 at angle θ
As shown below:
This can be applied in many ways (in triangles for example like he said)
Also theres some confusion because the symbol for dot product is the same as one of the many symbols for multiplication
The dot product of two vectors is equal to:
(u is the first vector, v is the second vector, n is the number of components in the vector, ui and vi are the x y or z components (1 is x, 2 is y, 3 is z, etc etc) )
Which is the very fancy math way to say “multiply the two vectors and add together all of the components”
In roblox terms Itd look something like:
local uhh = u * v
local dot_product = uhh.X + uhh.Y + uhh.Z
This is the equivalent of cos(θ) (when the vectors have a length of 1) but you dont have to know θ to figure it out which is amazingly useful (and it doesnt have to have a length of 1 in both vectors, only for it to be the equivalent of cos(θ), which is confusing but whatever)
I dont know why they didnt use a new symbol for dot product but its whatever
Thank you for the in depth explanation. When you say cos(0), is theta in degrees in the example u used or radians?
Also besides cos, there are many other trigometric functions that I dont know what they do (except working out angle or length of side of right-angle triangle), like math.sin and math.tan etc.
Again thanks, one of the few explanations I understand
I didnt really specify radians or degrees, and it really doesnt matter to the basic function of cos
There are a ton of trig functions, most of the ones youll run into are:
- sin
- cos
- tan
- csc (this is just 1/sin)
- sec (this is just 1/cos)
- cot (this is just 1/tan)
(An the inverse of all of these, usually called the arc functions (like cos-1 or acos or arccos)
And sometimes youll run into hyperbolic trig functions like:
- sinh
- cosh
- tanh
On and on for all of the normal trig functions but for hyperbolas
Theres also even more complex trig functions for not circles but ellipses, but these are just ridiculously complex
Heres a visualization of all of the “geometric” meanings you could say for the normal trig functions
I honestly didnt know any of these geometric meanings (besides sin and cos of course) but its cool to see them visualized, it makes them feel like they make more sense
But yeah basically sin gives you the y value of a point on a unit circle at an angle
cos gives you the x value of a point on a unit circle at an angle
tan gives you the distance of a line perpendicular to the line from the center of the circle to the angular point to the x axis
cot gives you the distance of a line perpendicular to the line from the center of the circle to the angular point to the y axis
csc gives you the distance along the y axis to this intersection point
sec gives you the distance along the x axis to this intersection point
As for the hyperbolic ones they do similar things to the normal trig functions mostly I think, I could visualize them but I have to do something
Hopefully that explains it a tiny bit