[00:00:17] So let's take what we know now about the special angles, sine and cosine of 30 degrees, 60 degrees, 45 degrees, and let's see if we can do some slightly more complicated angles using our understanding of the unit circle. So, [00:00:32] for example, what if I want to locate x and y, so find x and y for theta equals 120 degrees. And so first thing to think about is can I locate this angle in the unit circle, or in the four quadrants of the robot, and so if I do that at 120 degrees, I'm gonna be in the second quadrant [00:00:57] and so as I rotate from the x-axis, I'm going to get 2/3 of the way so I'll still have [00:01:03] a 60 degree angle remaining. So let's say this'll put us right about here, and so again, the angle of theta that's being measured from the x-axis, that's theta's 120 degrees, and what I'd like to know is the x and y values that correspond to the tip which are the two sides, x and y, the legs of the triangle. So again, the reference angle in this case, the angle between the link in the x-axis, is 60 degrees. And so the way to think about this is x is l times the cosine of theta, so it's the cosine of 120 degrees, but I can rewrite that as l times the cosine of 60, if I recognize that it's negative. So it's minus l times the cosine of 60 degrees, and if I know my special angle, that means that that's equal to minus l cosine of 60 degrees is 1/2. So that's just minus l divided by 2. The y value, similarly, is l times the sine of 120 degrees. And so, taking a look at the picture, y is a positive value, so that's going to give me a positive l times the sine of the reference angle, 60 degrees, and a sine of 60 is root 3 over 2. So this is a positive l root 3 divided by 2. [00:02:36] There's an alternative way to solve for theta equals 120 degrees. The approach I just did is the simplest way, but we can also use [00:02:45] trigonometric identities. And this is a good place to point out an example of that. So you could use a trig identity instead. So, [00:02:57] for example, [00:02:58] the sine of A plus or minus B, where A and B are angles, is equal to the sine of A times the cosine of B plus or minus the cosine of A times the sine of B. Similarly, if I have the cosine of A plus or minus B, there's a trig identity that says that's the same as the cosine of A times the cosine of B, and instead of plus or minus, we flip it around and go minus plus, and it would be then times the sine of A times the sine of B. [00:03:37] So either one of those could be used for theta equals 120 degrees. [00:03:42] So, for example, if I want to use the top one and use the identity of sine A plus or minus B, I can think about the sine of 120 degrees as being equal to the sine of the sum of two angles. If I choose those angles, where one would be trivial, say 90 degrees, plus 30 degrees, then when I evaluate the trigonometric identity, it becomes trivial. So the sine of A, in this case, A is 90 and B is 30, so this is the sine of 90 degrees times the cosine of 30 degrees, plus the cosine of 90 degrees times the sine of 30 degrees. [00:04:27] Based on the results we already saw, there are some trivial cases here: [00:04:31] the sine of 90 degrees. That guy is equal to 1. The cosine of 30 degrees, we know what that is. That's root 3 divided by 2, plus the cosine of 90 degrees, we know that that is 0. So whether or not I know that the sine of 30 degrees is 1/2, the second term there is 0. And so, the net result is that the sine of 120 degrees is equal to the only remaining term, root 3 divided by 2. Same result we got when we thought about the location here, 120 degrees, the sine corresponded to the y value, that's l times root 3 divided by 2. So that's a nice way to physically check that that [00:05:15] trigonometric identity works. Just for completeness, why don't we try a cosine number? [00:05:20] What if I do the cosine of 120 degrees and I say that's the cosine of 90 degrees plus 30 degrees? Well, that identity is this one up here, that says the cosine of A plus B would be the cosine A cosine B, minus the sine A sine B so, in this case, it's the cosine 90 degrees cosine 30 degrees minus the sine of 90 degrees times the sine of 30 degrees. And so if I now take a look at what are the trivial results, the cosine of 90 degrees, this is the one that's now 0, cosine of 30 doesn't matter anymore, even though I know that's root 3 divided by 2, and then minus the sine of 90 degrees, which is 1, and the sine of 30 degrees is 1/2. And so again, the first two terms multiply to get me 0, and so the net result here is that the cosine of 120 degrees, is the only remaining term, which is minus 1/2. And if you scroll back up again, you can see that, in this case, physically located in the second quadrant, x is the adjacent side, it is l times the cosine of 60, with a negative on it, which gives me minus l over 2, same thing I got from the trig identity here where the cosine of 120 degrees gives me negative 1/2. [00:06:53] So really the purpose of that example just to give you some confidence that these trigonometric identities really do work and they do correspond to what we would see if we physically put the robot in the right location. [00:07:07] So a couple more examples of illustrating how we can use both the reference angle and the quadrant for some angles that are not straight up special angles. So, [00:07:18] for example, what if I had theta is equal to 225 degrees? Well in that case, that's gonna put my link over into the third quadrant, so let's think about how would 225 rotate that? I would have to go 180 just to get lined up with the negative x-axis. 225 is an additional 45, so that would put me down here, in the third quadrant. So, here it is, location as shown with a total angle measured from the xaxis of theta equals 225 degrees. [00:07:59] And keep in mind, you could locate that same location [00:08:03] as a angle that was measured the other way, which is the same as theta equals minus 135 degrees. And so, either one of these things, theta's minus 135 degrees, or positive 225 degrees, is the exact same location in the plane. So again, in this case, if I want the tip of the robot, then I'm looking for the y and the x values, which are the legs of that triangle, to give me the (x,y) coordinate, and I can see that the reference angle with the x-axis is going to be a 45 degree angle. And so in that case, the way to think about it is x is l cosine theta, that's l times the cosine of 225 degrees, but I'm gonna write that in terms of the reference angle, recognizing that in that quadrant, x is a negative number and so is y, so this is minus l times the cosine now of the reference angle 45, and now I know the cosine 45, 1 over root 2, so minus l over root 2, is the result. I could look at y the same way; y is l times the sine of 225 degrees and, of course, that's the same as a negative l being in, again, the third quadrant, below the x-axis, times the sine of the reference angle which is, again, just 45 degrees. So I get minus l sine of 45, 1 over root 2. [00:09:29] So again, S-I-G-N, the sine of the angle is by the location, what quadrant it's in, and the value is based on knowing the sine and cosine of the special angle.