How to use Cos and Sin

Trigonometry doesn’t come in very frequently in programming, but when it does, it is really quite useful. But realistically, you’re more likely to see things like CFrame math and Vector math over advanced trigonometrical functions. I wouldn’t stress about it, sine and cosine are really only used for bobbing and smooth curves.
Though, not sure how exactly you’d compress CFrames through trig…

1 Like

Providing those in the diagram hurts no one. Was I supposed to find one that only had cos, sin, and tan? Nobody’s getting confused just because the other functions are present.

No, they don’t hurt. They just aren’t needed. Just providing my take that in programming, these trigonometrical functions are generally unneeded. And according to some of the replies to your comment, it did confuse a few people…
Nonetheless, a very interesting and cool diagram. It’s always nice to find where they come from and their connection to other parts of maths like circles (who would’ve guessed, triangles are related to circles!)

Not understanding θ will happen regardless of whether or not the other functions are included, so your point makes no sense.

Just providing my take that in programming, these trigonometrical functions are generally unneeded.

Didn’t say they were. I’ve never used anything except for sin, cos, and atan2. But seeing how all the functions relate to each other, the big picture, is extremely helpful for me, and seriously if you ever need to reach for something like even tan, seeing how it’s built up geometrically is a huge bonus.

Your comments don’t add any value to the thread, they are Generally Unneeded.

All I said was that the other trigonometrical functions were useless. What you misinterpreted it to mean was “the other trigonometrical functions are not needed in your diagram”. Your misunderstanding of my point led to you escalating this far more than it needed to be done. I was merely providing the additional info you failed to include in your original post; that the extra ones are generally not used in programming.
Sure, it’s helpful for you, and it’s a great way to see how they come together and are derived. Not denying that.
I feel like my comments have added quite a significant amount of value to the thread, particularly this one: How to use Cos and Sin - #18 by ValtryekRBLX, whereas your primary comment confused quite a few as you didn’t really explain it. Considering that the vast majority of people who have read this post do not know that much about sin and cos, your post should’ve explained clearly what everything meant in order to provide even a small degree of educational value.
Regardless, you’ve unnecessarily stirred this up into something far greater than it should’ve been. No need to continue this rather futile argument.

to add to this post and cos and sin’s usecases:
pyseph dev a while ago made a pebble rotate a player with a lot of code

i recommended to him that it could be done with just sine and cosine on the x and z coordinates, since they are 90* out of phase
heres an example

local part = part

RunService.Heartbeat:Connect(function()
        part.CFrame = script.Parent.CFrame  * CFrame.new(4 * math.sin(os.clock()), 0, 4 * math.cos(os.clock()))
end)

this code makes a part orbit around another part the scripts parented to

SOH CAH TOA is a much better way of explaining sin cos and tan

Yeah, I’m not reading the rest of this post, have fun with whatever big deal you made out of this for no reason.

I’m sorry? The point was not to downplay your own explanation at all.

Muting the thread.