^Similarly, OE is adjacent to phi, ^so cosine phi equals OE over r. ^But EP is y, so sine phi equals y over r. ^EP is opposite phi, so sine phi equals EP over r. ^The distance EP is y, and the distance OE is x. ^And let phi be the angle OP makes with the x-axis. ^Supposed r is the distance from the origin O to P. ^Let's get some practice using this diagram, ^by deriving a couple of formulas we'll need later. ^This diagram now has all the information we need. ^Finally, drop a perpendicular from P, ^to the x-axis, to create a point E. ^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. ^The amount we subtract is the length of the new line AD. ^Observe that the X coordinate of A, ^line OB, is greater than the ^ x-coordinate of P prime, line OC. ^Similarly, drop a perpendicular ^from P prime to get point C. ^Now, let's reverse the rotation, ^and drop a perpendicular from A, ^to the x-axis to define a point B. So, we drop a perpendicular from P prime to the x-axis to define a new point A. This looks like the situation we saw in the previous video when we rotated the point one zero on the x-axis. First, let's rotate the diagram, and imagine OP is the X-axis. 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. (wind whistling) (gun cocking) Let's call the point we start with, p, and the point it gets rotated to, p prime. And it'll take us a little work to get there, so roll up your sleeves and tie back your hair. (light turns on) ^(xylophone sound) A more elementary way to derive these formulas is using the basic definitions of Trigonometry.
One is to use properties of linear transformations. 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. Y prime equals x sine theta plus y cosine theta. X prime equals x cosine theta minus y sine theta. The formulas we'll come up with aren't too complicated, in fact, here they are. 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. To create our software tools for setting up shots, we need to have formulas for where every point goes when rotated. (bouncing noises) - Now we know the coordinates of a few ^special points when they're rotated.