Getting point-coordinates after a rotation












1












$begingroup$


I have two points $p_1$ and $p_2$ on a 2-dimensional graph, each having an $x$-coordinate and a $y$-coordinate. I want to rotate $p_2$ by $60^circ$ around $p_1$, such that $p_1$ is fixed in its position. So, how to know the new $p_2$ coordinates (after rotation)? I think there's some relation between the line that connects $p_1$ to $p_2$ and the angle $60^circ$, but can't figure what is.










share|cite|improve this question











$endgroup$

















    1












    $begingroup$


    I have two points $p_1$ and $p_2$ on a 2-dimensional graph, each having an $x$-coordinate and a $y$-coordinate. I want to rotate $p_2$ by $60^circ$ around $p_1$, such that $p_1$ is fixed in its position. So, how to know the new $p_2$ coordinates (after rotation)? I think there's some relation between the line that connects $p_1$ to $p_2$ and the angle $60^circ$, but can't figure what is.










    share|cite|improve this question











    $endgroup$















      1












      1








      1





      $begingroup$


      I have two points $p_1$ and $p_2$ on a 2-dimensional graph, each having an $x$-coordinate and a $y$-coordinate. I want to rotate $p_2$ by $60^circ$ around $p_1$, such that $p_1$ is fixed in its position. So, how to know the new $p_2$ coordinates (after rotation)? I think there's some relation between the line that connects $p_1$ to $p_2$ and the angle $60^circ$, but can't figure what is.










      share|cite|improve this question











      $endgroup$




      I have two points $p_1$ and $p_2$ on a 2-dimensional graph, each having an $x$-coordinate and a $y$-coordinate. I want to rotate $p_2$ by $60^circ$ around $p_1$, such that $p_1$ is fixed in its position. So, how to know the new $p_2$ coordinates (after rotation)? I think there's some relation between the line that connects $p_1$ to $p_2$ and the angle $60^circ$, but can't figure what is.







      geometry rotations






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Jul 5 '15 at 9:52









      Harish Chandra Rajpoot

      29.7k103772




      29.7k103772










      asked Sep 30 '12 at 8:22









      FindOutIslamNowFindOutIslamNow

      1176




      1176






















          2 Answers
          2






          active

          oldest

          votes


















          1












          $begingroup$

          Write the points in column vectors: $begin{pmatrix} x\y end{pmatrix}$. Then



          $P_2':=begin{pmatrix} cosvarphi & -sinvarphi \ sinvarphi & cosvarphi end{pmatrix}cdot (P_2-P_1) + P_1$



          where choose $varphi=pm 60^circ$ according which direction you want to rotate.






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            Thanks. But why do we have a matrix of derivatives? Is this matrix multiplication?
            $endgroup$
            – FindOutIslamNow
            Sep 30 '12 at 8:38












          • $begingroup$
            Yes, matrix multiplication, I could have expanded it. First reduced the problem where $P_1$ is the origo (shifted by $-P_1$ before rotation and $+P_1$ after), and the matrix multiplication gives the rotated vector.
            $endgroup$
            – Berci
            Sep 30 '12 at 9:22



















          0












          $begingroup$

          In the complex number plane, a rotation of a point, $z$, through an angle, $theta$, is accomplished by $z to z e^{i theta}$.



          If $z = x + iy$, where $x,y in mathbb R$, and $theta = 60^circ$, then



          $x + iy
          to (x + i y)(cos 60^circ + i sin 60^circ)
          to (x + iy)(1 + isqrt 3)/2
          to (x-frac 12ysqrt 3) + i(y +frac 12xsqrt 3)$



          In $mathbb R^2$, this translates into
          $(x,y) to (x-frac 12ysqrt 3, frac 12xsqrt 3 + y)$






          share|cite|improve this answer









          $endgroup$














            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "69"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f204792%2fgetting-point-coordinates-after-a-rotation%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1












            $begingroup$

            Write the points in column vectors: $begin{pmatrix} x\y end{pmatrix}$. Then



            $P_2':=begin{pmatrix} cosvarphi & -sinvarphi \ sinvarphi & cosvarphi end{pmatrix}cdot (P_2-P_1) + P_1$



            where choose $varphi=pm 60^circ$ according which direction you want to rotate.






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              Thanks. But why do we have a matrix of derivatives? Is this matrix multiplication?
              $endgroup$
              – FindOutIslamNow
              Sep 30 '12 at 8:38












            • $begingroup$
              Yes, matrix multiplication, I could have expanded it. First reduced the problem where $P_1$ is the origo (shifted by $-P_1$ before rotation and $+P_1$ after), and the matrix multiplication gives the rotated vector.
              $endgroup$
              – Berci
              Sep 30 '12 at 9:22
















            1












            $begingroup$

            Write the points in column vectors: $begin{pmatrix} x\y end{pmatrix}$. Then



            $P_2':=begin{pmatrix} cosvarphi & -sinvarphi \ sinvarphi & cosvarphi end{pmatrix}cdot (P_2-P_1) + P_1$



            where choose $varphi=pm 60^circ$ according which direction you want to rotate.






            share|cite|improve this answer









            $endgroup$













            • $begingroup$
              Thanks. But why do we have a matrix of derivatives? Is this matrix multiplication?
              $endgroup$
              – FindOutIslamNow
              Sep 30 '12 at 8:38












            • $begingroup$
              Yes, matrix multiplication, I could have expanded it. First reduced the problem where $P_1$ is the origo (shifted by $-P_1$ before rotation and $+P_1$ after), and the matrix multiplication gives the rotated vector.
              $endgroup$
              – Berci
              Sep 30 '12 at 9:22














            1












            1








            1





            $begingroup$

            Write the points in column vectors: $begin{pmatrix} x\y end{pmatrix}$. Then



            $P_2':=begin{pmatrix} cosvarphi & -sinvarphi \ sinvarphi & cosvarphi end{pmatrix}cdot (P_2-P_1) + P_1$



            where choose $varphi=pm 60^circ$ according which direction you want to rotate.






            share|cite|improve this answer









            $endgroup$



            Write the points in column vectors: $begin{pmatrix} x\y end{pmatrix}$. Then



            $P_2':=begin{pmatrix} cosvarphi & -sinvarphi \ sinvarphi & cosvarphi end{pmatrix}cdot (P_2-P_1) + P_1$



            where choose $varphi=pm 60^circ$ according which direction you want to rotate.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Sep 30 '12 at 8:34









            BerciBerci

            62.1k23776




            62.1k23776












            • $begingroup$
              Thanks. But why do we have a matrix of derivatives? Is this matrix multiplication?
              $endgroup$
              – FindOutIslamNow
              Sep 30 '12 at 8:38












            • $begingroup$
              Yes, matrix multiplication, I could have expanded it. First reduced the problem where $P_1$ is the origo (shifted by $-P_1$ before rotation and $+P_1$ after), and the matrix multiplication gives the rotated vector.
              $endgroup$
              – Berci
              Sep 30 '12 at 9:22


















            • $begingroup$
              Thanks. But why do we have a matrix of derivatives? Is this matrix multiplication?
              $endgroup$
              – FindOutIslamNow
              Sep 30 '12 at 8:38












            • $begingroup$
              Yes, matrix multiplication, I could have expanded it. First reduced the problem where $P_1$ is the origo (shifted by $-P_1$ before rotation and $+P_1$ after), and the matrix multiplication gives the rotated vector.
              $endgroup$
              – Berci
              Sep 30 '12 at 9:22
















            $begingroup$
            Thanks. But why do we have a matrix of derivatives? Is this matrix multiplication?
            $endgroup$
            – FindOutIslamNow
            Sep 30 '12 at 8:38






            $begingroup$
            Thanks. But why do we have a matrix of derivatives? Is this matrix multiplication?
            $endgroup$
            – FindOutIslamNow
            Sep 30 '12 at 8:38














            $begingroup$
            Yes, matrix multiplication, I could have expanded it. First reduced the problem where $P_1$ is the origo (shifted by $-P_1$ before rotation and $+P_1$ after), and the matrix multiplication gives the rotated vector.
            $endgroup$
            – Berci
            Sep 30 '12 at 9:22




            $begingroup$
            Yes, matrix multiplication, I could have expanded it. First reduced the problem where $P_1$ is the origo (shifted by $-P_1$ before rotation and $+P_1$ after), and the matrix multiplication gives the rotated vector.
            $endgroup$
            – Berci
            Sep 30 '12 at 9:22











            0












            $begingroup$

            In the complex number plane, a rotation of a point, $z$, through an angle, $theta$, is accomplished by $z to z e^{i theta}$.



            If $z = x + iy$, where $x,y in mathbb R$, and $theta = 60^circ$, then



            $x + iy
            to (x + i y)(cos 60^circ + i sin 60^circ)
            to (x + iy)(1 + isqrt 3)/2
            to (x-frac 12ysqrt 3) + i(y +frac 12xsqrt 3)$



            In $mathbb R^2$, this translates into
            $(x,y) to (x-frac 12ysqrt 3, frac 12xsqrt 3 + y)$






            share|cite|improve this answer









            $endgroup$


















              0












              $begingroup$

              In the complex number plane, a rotation of a point, $z$, through an angle, $theta$, is accomplished by $z to z e^{i theta}$.



              If $z = x + iy$, where $x,y in mathbb R$, and $theta = 60^circ$, then



              $x + iy
              to (x + i y)(cos 60^circ + i sin 60^circ)
              to (x + iy)(1 + isqrt 3)/2
              to (x-frac 12ysqrt 3) + i(y +frac 12xsqrt 3)$



              In $mathbb R^2$, this translates into
              $(x,y) to (x-frac 12ysqrt 3, frac 12xsqrt 3 + y)$






              share|cite|improve this answer









              $endgroup$
















                0












                0








                0





                $begingroup$

                In the complex number plane, a rotation of a point, $z$, through an angle, $theta$, is accomplished by $z to z e^{i theta}$.



                If $z = x + iy$, where $x,y in mathbb R$, and $theta = 60^circ$, then



                $x + iy
                to (x + i y)(cos 60^circ + i sin 60^circ)
                to (x + iy)(1 + isqrt 3)/2
                to (x-frac 12ysqrt 3) + i(y +frac 12xsqrt 3)$



                In $mathbb R^2$, this translates into
                $(x,y) to (x-frac 12ysqrt 3, frac 12xsqrt 3 + y)$






                share|cite|improve this answer









                $endgroup$



                In the complex number plane, a rotation of a point, $z$, through an angle, $theta$, is accomplished by $z to z e^{i theta}$.



                If $z = x + iy$, where $x,y in mathbb R$, and $theta = 60^circ$, then



                $x + iy
                to (x + i y)(cos 60^circ + i sin 60^circ)
                to (x + iy)(1 + isqrt 3)/2
                to (x-frac 12ysqrt 3) + i(y +frac 12xsqrt 3)$



                In $mathbb R^2$, this translates into
                $(x,y) to (x-frac 12ysqrt 3, frac 12xsqrt 3 + y)$







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Dec 31 '18 at 16:24









                steven gregorysteven gregory

                18.5k32359




                18.5k32359






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Mathematics Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f204792%2fgetting-point-coordinates-after-a-rotation%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to change which sound is reproduced for terminal bell?

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents