Is there an “idiomatic” way to make x-y movement (e.g. arrow keys) correspond to rotations in $mathbbR^3$?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Is there an "idiomatic" way to make x-y movement (e.g. arrow keys) correspond to rotations in $mathbbR^3$?



Intuitively the up, down, left and right of arrow keys would mean moving a $mathbbR^3$ vertex to the corresponding directions. However, since $mathbbR^3$ doesn't have clear "horizontal" and "vertical", but it also has depth, then I've been wondering how to "map" horizontal and vertical to $mathbbR^3$?



Or is this impossible?







share|cite|improve this question



















  • If you want to rotate an object that the viewer is looking at, the up arrow usually means "rotate the axis pointing towards the viewer upwards". For example if the x-axis points right, the y-axis points up, and the z-axis points towards the viewer, then pressing the up arrow should cause a rotation about the negative x-axis.
    – Rahul
    Aug 2 at 22:20










  • Anyway this looks like it belongs on computergraphics.stackexchange.com.
    – Rahul
    Aug 2 at 22:21










  • There are threedegrees of freedom for rotations. Read the Euler angles Wikipedia article for details. I think that you will need three pairs of keys to indicate rotations.
    – Somos
    Aug 2 at 23:13










  • There are three degrees of freedom, but one of those can be realized by how long the user holds down the buttons.
    – MJD
    Aug 2 at 23:31














up vote
1
down vote

favorite












Is there an "idiomatic" way to make x-y movement (e.g. arrow keys) correspond to rotations in $mathbbR^3$?



Intuitively the up, down, left and right of arrow keys would mean moving a $mathbbR^3$ vertex to the corresponding directions. However, since $mathbbR^3$ doesn't have clear "horizontal" and "vertical", but it also has depth, then I've been wondering how to "map" horizontal and vertical to $mathbbR^3$?



Or is this impossible?







share|cite|improve this question



















  • If you want to rotate an object that the viewer is looking at, the up arrow usually means "rotate the axis pointing towards the viewer upwards". For example if the x-axis points right, the y-axis points up, and the z-axis points towards the viewer, then pressing the up arrow should cause a rotation about the negative x-axis.
    – Rahul
    Aug 2 at 22:20










  • Anyway this looks like it belongs on computergraphics.stackexchange.com.
    – Rahul
    Aug 2 at 22:21










  • There are threedegrees of freedom for rotations. Read the Euler angles Wikipedia article for details. I think that you will need three pairs of keys to indicate rotations.
    – Somos
    Aug 2 at 23:13










  • There are three degrees of freedom, but one of those can be realized by how long the user holds down the buttons.
    – MJD
    Aug 2 at 23:31












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Is there an "idiomatic" way to make x-y movement (e.g. arrow keys) correspond to rotations in $mathbbR^3$?



Intuitively the up, down, left and right of arrow keys would mean moving a $mathbbR^3$ vertex to the corresponding directions. However, since $mathbbR^3$ doesn't have clear "horizontal" and "vertical", but it also has depth, then I've been wondering how to "map" horizontal and vertical to $mathbbR^3$?



Or is this impossible?







share|cite|improve this question











Is there an "idiomatic" way to make x-y movement (e.g. arrow keys) correspond to rotations in $mathbbR^3$?



Intuitively the up, down, left and right of arrow keys would mean moving a $mathbbR^3$ vertex to the corresponding directions. However, since $mathbbR^3$ doesn't have clear "horizontal" and "vertical", but it also has depth, then I've been wondering how to "map" horizontal and vertical to $mathbbR^3$?



Or is this impossible?









share|cite|improve this question










share|cite|improve this question




share|cite|improve this question









asked Aug 2 at 22:13









mavavilj

2,404729




2,404729











  • If you want to rotate an object that the viewer is looking at, the up arrow usually means "rotate the axis pointing towards the viewer upwards". For example if the x-axis points right, the y-axis points up, and the z-axis points towards the viewer, then pressing the up arrow should cause a rotation about the negative x-axis.
    – Rahul
    Aug 2 at 22:20










  • Anyway this looks like it belongs on computergraphics.stackexchange.com.
    – Rahul
    Aug 2 at 22:21










  • There are threedegrees of freedom for rotations. Read the Euler angles Wikipedia article for details. I think that you will need three pairs of keys to indicate rotations.
    – Somos
    Aug 2 at 23:13










  • There are three degrees of freedom, but one of those can be realized by how long the user holds down the buttons.
    – MJD
    Aug 2 at 23:31
















  • If you want to rotate an object that the viewer is looking at, the up arrow usually means "rotate the axis pointing towards the viewer upwards". For example if the x-axis points right, the y-axis points up, and the z-axis points towards the viewer, then pressing the up arrow should cause a rotation about the negative x-axis.
    – Rahul
    Aug 2 at 22:20










  • Anyway this looks like it belongs on computergraphics.stackexchange.com.
    – Rahul
    Aug 2 at 22:21










  • There are threedegrees of freedom for rotations. Read the Euler angles Wikipedia article for details. I think that you will need three pairs of keys to indicate rotations.
    – Somos
    Aug 2 at 23:13










  • There are three degrees of freedom, but one of those can be realized by how long the user holds down the buttons.
    – MJD
    Aug 2 at 23:31















If you want to rotate an object that the viewer is looking at, the up arrow usually means "rotate the axis pointing towards the viewer upwards". For example if the x-axis points right, the y-axis points up, and the z-axis points towards the viewer, then pressing the up arrow should cause a rotation about the negative x-axis.
– Rahul
Aug 2 at 22:20




If you want to rotate an object that the viewer is looking at, the up arrow usually means "rotate the axis pointing towards the viewer upwards". For example if the x-axis points right, the y-axis points up, and the z-axis points towards the viewer, then pressing the up arrow should cause a rotation about the negative x-axis.
– Rahul
Aug 2 at 22:20












Anyway this looks like it belongs on computergraphics.stackexchange.com.
– Rahul
Aug 2 at 22:21




Anyway this looks like it belongs on computergraphics.stackexchange.com.
– Rahul
Aug 2 at 22:21












There are threedegrees of freedom for rotations. Read the Euler angles Wikipedia article for details. I think that you will need three pairs of keys to indicate rotations.
– Somos
Aug 2 at 23:13




There are threedegrees of freedom for rotations. Read the Euler angles Wikipedia article for details. I think that you will need three pairs of keys to indicate rotations.
– Somos
Aug 2 at 23:13












There are three degrees of freedom, but one of those can be realized by how long the user holds down the buttons.
– MJD
Aug 2 at 23:31




There are three degrees of freedom, but one of those can be realized by how long the user holds down the buttons.
– MJD
Aug 2 at 23:31










1 Answer
1






active

oldest

votes

















up vote
1
down vote













For rotations about lines through the origin, you can use just the four arrow keys.



You can specify the axis of rotation using a unit direction vector



$$ vecV=langle a,b,crangle=leftlanglesin(x),cos(x)sin(y),sqrt1-(sin^2(x)+cos^2(x)sin^2(y))rightrangle$$



Use one arrow key, let's say '$rightarrow$' to specify the value of $xge0$.



Use a second arrow key '$leftarrow$'to specify the value of $yge0$.



This allows the value of $a$ to cycle between values of $-1$ and $1$, the values of $b$ to cycle between values of $-sqrt1-a^2$ and $sqrt1-a^2 $ to express any direction $langle a,b,sqrt1-(a^2+b^2)rangle$ in $mathbbR^3$.



Then you can use the up and down arrows to indicate the amount $theta$ of positive or negative rotation about the axis.



To rotate about a line not passing through the origin one would first have to translate it to the origin, rotate, then do the inverse translation.






share|cite|improve this answer























    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    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%2f2870536%2fis-there-an-idiomatic-way-to-make-x-y-movement-e-g-arrow-keys-correspond-to%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    For rotations about lines through the origin, you can use just the four arrow keys.



    You can specify the axis of rotation using a unit direction vector



    $$ vecV=langle a,b,crangle=leftlanglesin(x),cos(x)sin(y),sqrt1-(sin^2(x)+cos^2(x)sin^2(y))rightrangle$$



    Use one arrow key, let's say '$rightarrow$' to specify the value of $xge0$.



    Use a second arrow key '$leftarrow$'to specify the value of $yge0$.



    This allows the value of $a$ to cycle between values of $-1$ and $1$, the values of $b$ to cycle between values of $-sqrt1-a^2$ and $sqrt1-a^2 $ to express any direction $langle a,b,sqrt1-(a^2+b^2)rangle$ in $mathbbR^3$.



    Then you can use the up and down arrows to indicate the amount $theta$ of positive or negative rotation about the axis.



    To rotate about a line not passing through the origin one would first have to translate it to the origin, rotate, then do the inverse translation.






    share|cite|improve this answer



























      up vote
      1
      down vote













      For rotations about lines through the origin, you can use just the four arrow keys.



      You can specify the axis of rotation using a unit direction vector



      $$ vecV=langle a,b,crangle=leftlanglesin(x),cos(x)sin(y),sqrt1-(sin^2(x)+cos^2(x)sin^2(y))rightrangle$$



      Use one arrow key, let's say '$rightarrow$' to specify the value of $xge0$.



      Use a second arrow key '$leftarrow$'to specify the value of $yge0$.



      This allows the value of $a$ to cycle between values of $-1$ and $1$, the values of $b$ to cycle between values of $-sqrt1-a^2$ and $sqrt1-a^2 $ to express any direction $langle a,b,sqrt1-(a^2+b^2)rangle$ in $mathbbR^3$.



      Then you can use the up and down arrows to indicate the amount $theta$ of positive or negative rotation about the axis.



      To rotate about a line not passing through the origin one would first have to translate it to the origin, rotate, then do the inverse translation.






      share|cite|improve this answer

























        up vote
        1
        down vote










        up vote
        1
        down vote









        For rotations about lines through the origin, you can use just the four arrow keys.



        You can specify the axis of rotation using a unit direction vector



        $$ vecV=langle a,b,crangle=leftlanglesin(x),cos(x)sin(y),sqrt1-(sin^2(x)+cos^2(x)sin^2(y))rightrangle$$



        Use one arrow key, let's say '$rightarrow$' to specify the value of $xge0$.



        Use a second arrow key '$leftarrow$'to specify the value of $yge0$.



        This allows the value of $a$ to cycle between values of $-1$ and $1$, the values of $b$ to cycle between values of $-sqrt1-a^2$ and $sqrt1-a^2 $ to express any direction $langle a,b,sqrt1-(a^2+b^2)rangle$ in $mathbbR^3$.



        Then you can use the up and down arrows to indicate the amount $theta$ of positive or negative rotation about the axis.



        To rotate about a line not passing through the origin one would first have to translate it to the origin, rotate, then do the inverse translation.






        share|cite|improve this answer















        For rotations about lines through the origin, you can use just the four arrow keys.



        You can specify the axis of rotation using a unit direction vector



        $$ vecV=langle a,b,crangle=leftlanglesin(x),cos(x)sin(y),sqrt1-(sin^2(x)+cos^2(x)sin^2(y))rightrangle$$



        Use one arrow key, let's say '$rightarrow$' to specify the value of $xge0$.



        Use a second arrow key '$leftarrow$'to specify the value of $yge0$.



        This allows the value of $a$ to cycle between values of $-1$ and $1$, the values of $b$ to cycle between values of $-sqrt1-a^2$ and $sqrt1-a^2 $ to express any direction $langle a,b,sqrt1-(a^2+b^2)rangle$ in $mathbbR^3$.



        Then you can use the up and down arrows to indicate the amount $theta$ of positive or negative rotation about the axis.



        To rotate about a line not passing through the origin one would first have to translate it to the origin, rotate, then do the inverse translation.







        share|cite|improve this answer















        share|cite|improve this answer



        share|cite|improve this answer








        edited Aug 3 at 0:00


























        answered Aug 2 at 23:41









        John Wayland Bales

        12.8k21135




        12.8k21135






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870536%2fis-there-an-idiomatic-way-to-make-x-y-movement-e-g-arrow-keys-correspond-to%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?