(bouncing noises) - Now we know the coordinates of a few ^special points when they're rotated. To create our software tools for setting up shots, we need to have formulas for where every point goes when rotated. That is if we start with an arbitrary point, x y, we'd like to know the coordinates of x prime y prime, with a point where it ends up after rotation. The formulas we'll come up with aren't too complicated, in fact, here they are. X prime equals x cosine theta minus y sine theta. Y prime equals x sine theta plus y cosine theta. So knowing x, y, and theta, you can compute x prime and y prime, but where do these formulas come from? Well there's a couple of different ways to get these formulas. One is to use properties of linear transformations. (light turns on) ^(xylophone sound) A more elementary way to derive these formulas is using the basic definitions of Trigonometry. And it'll take us a little work to get there, so roll up your sleeves and tie back your hair. (wind whistling) (gun cocking) Let's call the point we start with, p, and the point it gets rotated to, p prime. We need to construct some other points to help us, so let's go back to what we already know, and break down the problem. First, let's rotate the diagram, and imagine OP is the X-axis. This looks like the situation we saw in the previous video when we rotated the point one zero on the x-axis. So, we drop a perpendicular from P prime to the x-axis to define a new point A. ^Now, let's reverse the rotation, ^and drop a perpendicular from A, ^to the x-axis to define a point B. ^Similarly, drop a perpendicular ^from P prime to get point C. ^Observe that the X coordinate of A, ^line OB, is greater than the ^ x-coordinate of P prime, line OC. ^So we must subtract a certain amount. ^The amount we subtract is the length of the new line AD. ^Recall the coordinates of P prime we're looking for ^are defined by OC for the x-coordinate, ^and CP prime for the y-coordinate. ^Finally, drop a perpendicular from P, ^to the x-axis, to create a point E. ^This diagram now has all the information we need. ^Let's get some practice using this diagram, ^by deriving a couple of formulas we'll need later. ^Supposed r is the distance from the origin O to P. ^And let phi be the angle OP makes with the x-axis. ^The distance EP is y, and the distance OE is x. ^EP is opposite phi, so sine phi equals EP over r. ^But EP is y, so sine phi equals y over r. ^And that means y equals r sine phi. ^Similarly, OE is adjacent to phi, ^so cosine phi equals OE over r. ^But OE is just x, so cosine phi equals x over r, ^and that means x equals r cosine phi. Wow, that was a lot of Trigonometry! Before we proceed, see if you can answer a few general questions about ^this diagram in the next exercise. ^Good luck.