If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# 3. Completing the proof

## Video transcript

in the previous exercise you should have found that length Oh a is R cosine theta but why first notice that opa is a right triangle so we can use sine and cosine Oh a is the side adjacent to theta meaning that Oh a equals R cosine theta similarly ap prime equals R sine theta good so we need to show that angle DP prime a is Phi that's because there are similar triangles lurking in there in particular this triangle and this triangle are similar to see that notice that this angle is equal to this angle because of the opposite angle theorem notice also that this angle is 90 degrees as is this angle meaning that the two triangles share two angles they must also share the third angle because all three angles must add up to 180 degrees thus CP prime a is Phi now we're set one thing we're looking for is this distance OC because that's ex prime as we observed earlier OC is equal to OB minus BC so X prime equals OB minus BC and since BC equals ad we can write X prime equals OB minus ad but what's OB it's adjacent to Phi so cosine Phi equals OB over Oh a and we know that Oh a equals R cosine theta so cosine Phi equals OB over R cosine theta and OB equals R cosine theta cosine Phi so OB equals R cosine Phi times cosine theta but we know that R cosine Phi is just X so OB equals x cosine theta now what's ad well ad is opposite Phi in the triangle D P prime a so sine Phi equals ad over ap Prime and we know that ap prime equals R sine theta so sine Phi equals ad over R sine theta which means that ad equals R sine theta sine Phi which can be rearranged to be R sine Phi times sine theta and we know that R sine Phi is just Y so ad equals y sine theta okay so that means X prime equals X cosine theta minus y sine theta so we're halfway there now we just need to know what Y prime is CP prime is y prime and it can be written as CP prime equals DP prime plus ayby DP prime is adjacent to Phi so cosine Phi equals DP prime over AP prime but AP prime is R sine theta so cosine Phi equals DP prime over R sine theta and DP prime equals R sine theta times cosine Phi which equals X sine theta a B is opposite Phi so sine Phi equals a B divided by o a but Oh a is our cosine theta so sine Phi equals a B over R cosine theta and that means a B equals R sine Phi times cosine theta but our sine Phi is just Y so a B equals y cosine theta putting this together Y prime equals x sine theta plus y cosine theta yay we did it in summary X prime equals X cosine theta minus y sine theta and Y prime equals X sine theta plus y cosine theta you hung in there and now you've seen this super useful and prevalent formula what are you doing computer graphics are building bridges or triangulating positions you're going to see these formulas come up again and again and again use the next exercise to get some practice with them