0

Why do these formulas rotate a point $(x,y)$ counterclockwise or clockwise by an angle of $\theta$? I have no idea how to start; I want a step-by-step explanation.

Counterclockwise: $x'=x\cos\theta-y\sin\theta$, $y'=x\sin\theta+y\cos\theta$
Clockwise: $x'=x\cos\theta+y\sin\theta$, $y'=-x\sin\theta+y\cos\theta$

  • 1
    This is the set of equations normally represented by a rotation matrix (https://en.wikipedia.org/wiki/Rotation_matrix). There are a ton explanations online, this one is nice and clear: http://www.sunshine2k.de/articles/RotationDerivation.pdf – Carser Aug 24 '16 at 01:57
  • Thanks for reposting this. – Deepak Aug 24 '16 at 02:00
  • 2
    @Deepak you should not encourage a user to repost (as a new question) the very same question that was closed, nor should you condone the same. By answering the re-post, you reinforced such behavior. – amWhy Aug 24 '16 at 23:46
  • @amWhy In the first place, I disagree with the other post having been closed. It was marked "unclear" but I found it perfectly clear what was being asked. There may have been an argument for "off topic" due to no effort, but this had the air of a genuine conceptual question rather than just a homework question. Anyway, the issue was that I had painstakingly created a diagram to help the asker (and others) with the same question, but it was closed before I could post my answer. Which is why I'm grateful to the asker for reposting it, so my effort wasn't wasted. – Deepak Aug 25 '16 at 12:58
  • You might also note that my answer was in the vein of "teaching a man to fish" as I didn't do all the work, just part of it to get the idea across. So that's in keeping with the ethos of this site as well. Plus I even linked this thread to another answer I gave so I think I managed to help another group of people there too. Isn't that what this site should ultimately be about, helping answer questions? – Deepak Aug 25 '16 at 13:00
  • @Deepak You need to know that if a question that you want to answer, or have answered, when it's been closed prior to you posting, you can encourage the OP to edit the question (in itself initiates its placement in the review queue), you can even have edited the question for the same reason, if it aims to genuine improve the post, and you also have means to ask others to reopen. – amWhy Aug 25 '16 at 16:16
  • ....It is not okay to encourage an OP to repost a closed question (and in so doing leading to a close for duplication) so you can add your precious answer. – amWhy Aug 25 '16 at 16:18
  • If you think that question is good enough, you might ask for reopen in meta. And if more people agree with you, the question will get reopened and your effort will not be wasted. –  Aug 25 '16 at 18:24
  • @amWhy And I did not encourage the OP to do that. I did vote to reopen (as did two others). The OP took his own initiative to repost the question, and I thanked him for it. There is a distinction. And yes, my answer, or at least the effort and time I put into it is "precious" to me, so your obvious sarcasm doesn't work on me. – Deepak Aug 25 '16 at 23:37
  • @ArcticChar Thank you for the suggestion, it's constructive and I appreciate it. I did vote to reopen. I did it via the forum function, as I did not wish to clutter meta with another thread on a single topic. As it stands, the original question remains closed with 3 reopen votes. If the asker hadn't reposted, my effort would definitely have been wasted because I'd have lost the link to the image, etc. Please remember that a lot of us are doing this in our spare time between duties at work, etc. So we don't always get to answer in ideal circumstances. Anyway, I'll do as you advise next time. – Deepak Aug 25 '16 at 23:41
  • To put things on a more constructive footing, the larger issue is having a grace period after a question is closed when people who've already started on an answer are allowed to finish up (but no new answers can be begun). In fact, there is a meta thread on this to which I've added a small suggestion (in the form of a renewable timer): http://meta.math.stackexchange.com/questions/4625/grace-period-when-a-question-is-closed?rq=1 – Deepak Aug 26 '16 at 02:05
  • @Deepak: It is very plausible that the asker misunderstood your comment in their first question. Your comment is sort or a plea to everyone to reopen the question, but the asker ended up repost and tell you that the question was reopened. –  Aug 26 '16 at 02:49
  • @JasperLoy Thank you very much! I appreciate it. :) – Deepak Aug 31 '16 at 01:53

1 Answers1

0

enter image description here

See image. This represents a counter-clockwise rotation of an original red segment (terminating at the original point) to a new blue segment (terminating at the new point). The line segment length $r$ is held constant.

The original coordinates $(x,y) = (r\cos\theta, r\sin\theta)$

The new coordinates $(x',y') = (r\cos(\theta + \alpha), r\sin(\theta + \alpha))$

Using angle sum formula, let's re-express the coordinate $x'$:

$r\cos(\theta + \alpha) = r\cos\theta\cos\alpha - r\sin\theta\sin\alpha = x\cos\theta - y\sin\theta$

You can now work out $y'$ and handle the clockwise case yourself.

Deepak
  • 26,801