Identity sin(A+B)=sin(A)cos(B)+sin(B)cos(A)

Started by
15 comments, last by curlious 20 years, 6 months ago
Reviewing a little trig I was wandering what are some uses for the identity sin(A+B)=sin(A)cos(B)+sin(B)cos(A) in 2d graphics. [edited by - curlious on October 13, 2003 11:30:10 PM]
Advertisement
Its completely useless.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
It comes in handy in simplifying various equations, especially in preparation to integrate them.

How appropriate. You fight like a cow.
When was the last time you had to simplify sin(A)cos(B)+sin(B)cos(A)? I can''t even think of any other cases where it would be useful since sin(A)cos(B)+sin(B)cos(A) doesn''t have a factor so it wouldn''t help reducing if you had sin(A+B)/something.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
quote:Original post by clum
When was the last time you had to simplify sin(A)cos(B)+sin(B)cos(A)? I can''t even think of any other cases where it would be useful since sin(A)cos(B)+sin(B)cos(A) doesn''t have a factor so it wouldn''t help reducing if you had sin(A+B)/something.

No, you do it the other way around. You change sin(A+B) into sin(A)cos(B)+sin(B)cos(A) while simplifying.

Trust me on this. You often don''t want multiple terms inside transcendental functions when simplifying, and this is one of the tools you have at your disposal in eliminating them. It''s an extremely useful equation.

How appropriate. You fight like a cow.
but does it have some use in 2D graphics though?
sin(2A) = sin(A+A) = sin(A)cos(A)+sin(A)cos(A) = 2sin(A)cos(A)

I tend to find that variation of it useful, especially in situations like this:

sin(2A) = cos(A)

because of course you can get

2sin(A)cos(A) = cos(A)
2sin(A) = 1
sin(A) = 0.5

and thus solve for A.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Take a class on ordinary differential equations and you will find all the annoying trig identities come back to haunt you because there are many things that are modeled using either combinations of sin and cos or multiple terms inside a single sin or cos. Take for example the function for an oscillating system which is u(t) = A*sin(w(0)*t+d). That function right there is really obnoxious to integrate but you can expand it and make it some form of u = c1*cos(w(0)*t) + c2*sin(w(0)*t) and make your life a lot easier.
You can also use it to figure out the sin of (whatever) by inserting in two degrees of sin that you do know.
For example:
>What is the sin of 135 degrees?
>What two degrees that you do know make up 135... 90 and 45 degrees? sin(90)=1, cos(90)=0, sin(45)=.707, cos(45)=.707
>So... sin(90+45)=sin(90)*cos(45)+cos(90)*sin(45)
> sin(135) == sin(90)*cos(45)+cos(90)*sin(45)

If you have a dad like mine, he will make you memorize all the sin,cos,tangent equations with the unit circle.
quote:Original post by Xiachunyi
If you have a dad like mine, he will make you memorize all the sin,cos,tangent equations with the unit circle.
Thank God, I am not you.

This topic is closed to new replies.

Advertisement