translate linear coordinates to circular space

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











up vote
0
down vote

favorite












I have $5$ points ($P_0 rightarrow P_4$) on a straight line, and $4$ control points ($C_1 rightarrow C_4$) that I use to connect the points with quadratic bezier curves (as seen in the top part of the image below).



linear to circular drawing



What I want to do is bend this 'linear' layout into 'circular' space, as seen in the bottom part. Is there a formula I can apply to my points' $xy$ coordinates to achieve this? If so I would like to have a variable with which I can control the curvature (e.g. $0$ for straight, $0.5$ for semi-circle, $1$ for full circle.



(apologies if I'm not expressing myself well - I'm a coder - so please feel free to edit the question)







share|cite|improve this question

























    up vote
    0
    down vote

    favorite












    I have $5$ points ($P_0 rightarrow P_4$) on a straight line, and $4$ control points ($C_1 rightarrow C_4$) that I use to connect the points with quadratic bezier curves (as seen in the top part of the image below).



    linear to circular drawing



    What I want to do is bend this 'linear' layout into 'circular' space, as seen in the bottom part. Is there a formula I can apply to my points' $xy$ coordinates to achieve this? If so I would like to have a variable with which I can control the curvature (e.g. $0$ for straight, $0.5$ for semi-circle, $1$ for full circle.



    (apologies if I'm not expressing myself well - I'm a coder - so please feel free to edit the question)







    share|cite|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have $5$ points ($P_0 rightarrow P_4$) on a straight line, and $4$ control points ($C_1 rightarrow C_4$) that I use to connect the points with quadratic bezier curves (as seen in the top part of the image below).



      linear to circular drawing



      What I want to do is bend this 'linear' layout into 'circular' space, as seen in the bottom part. Is there a formula I can apply to my points' $xy$ coordinates to achieve this? If so I would like to have a variable with which I can control the curvature (e.g. $0$ for straight, $0.5$ for semi-circle, $1$ for full circle.



      (apologies if I'm not expressing myself well - I'm a coder - so please feel free to edit the question)







      share|cite|improve this question













      I have $5$ points ($P_0 rightarrow P_4$) on a straight line, and $4$ control points ($C_1 rightarrow C_4$) that I use to connect the points with quadratic bezier curves (as seen in the top part of the image below).



      linear to circular drawing



      What I want to do is bend this 'linear' layout into 'circular' space, as seen in the bottom part. Is there a formula I can apply to my points' $xy$ coordinates to achieve this? If so I would like to have a variable with which I can control the curvature (e.g. $0$ for straight, $0.5$ for semi-circle, $1$ for full circle.



      (apologies if I'm not expressing myself well - I'm a coder - so please feel free to edit the question)









      share|cite|improve this question












      share|cite|improve this question




      share|cite|improve this question








      edited Jul 26 at 9:54









      Kenta S

      1,1371418




      1,1371418









      asked Jul 26 at 9:47









      Hoff

      1012




      1012




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          WLOG I assume that $P_0=(-1,0)$ and $P_4=(1,0)$ (if not, a translation+rotation+scaling will achieve that).



          Now consider a circle of radius $r$ passing by the two given points. By Pythagoras, its center is at $(0,-h)$ with $h:=sqrtr^2-1$, and the half-aperture angle is $alpha=arcsindfrac1r$.



          Using polar coordinates with the pole at $(0,-h)$, you will map the abscissas to angles ($xtotheta=dfracpi2+xalpha$) and the ordinates to moduli ($ytorho=r+y$), and



          $$X=(r+y)cos(fracpi2+xalpha)=(r+y)sin(xalpha),\Y=(r+y)sin(fracpi2+xalpha)-h=(r+y)cos(xalpha)-h.$$



          This way the origin $(0, 0)$ maps to the Cartesian coordinates $(0,r-h)$ and the endpoints $(pm1,0)$ to themselves.




          Note that for very large $r$, $alphaapproxdfrac1r$ and $happrox r$ so that



          $$Xapprox(r+y)frac xrapprox x,$$



          $$Yapprox (r+y)cdot1-happrox y.$$






          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%2f2863262%2ftranslate-linear-coordinates-to-circular-space%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
            0
            down vote













            WLOG I assume that $P_0=(-1,0)$ and $P_4=(1,0)$ (if not, a translation+rotation+scaling will achieve that).



            Now consider a circle of radius $r$ passing by the two given points. By Pythagoras, its center is at $(0,-h)$ with $h:=sqrtr^2-1$, and the half-aperture angle is $alpha=arcsindfrac1r$.



            Using polar coordinates with the pole at $(0,-h)$, you will map the abscissas to angles ($xtotheta=dfracpi2+xalpha$) and the ordinates to moduli ($ytorho=r+y$), and



            $$X=(r+y)cos(fracpi2+xalpha)=(r+y)sin(xalpha),\Y=(r+y)sin(fracpi2+xalpha)-h=(r+y)cos(xalpha)-h.$$



            This way the origin $(0, 0)$ maps to the Cartesian coordinates $(0,r-h)$ and the endpoints $(pm1,0)$ to themselves.




            Note that for very large $r$, $alphaapproxdfrac1r$ and $happrox r$ so that



            $$Xapprox(r+y)frac xrapprox x,$$



            $$Yapprox (r+y)cdot1-happrox y.$$






            share|cite|improve this answer



























              up vote
              0
              down vote













              WLOG I assume that $P_0=(-1,0)$ and $P_4=(1,0)$ (if not, a translation+rotation+scaling will achieve that).



              Now consider a circle of radius $r$ passing by the two given points. By Pythagoras, its center is at $(0,-h)$ with $h:=sqrtr^2-1$, and the half-aperture angle is $alpha=arcsindfrac1r$.



              Using polar coordinates with the pole at $(0,-h)$, you will map the abscissas to angles ($xtotheta=dfracpi2+xalpha$) and the ordinates to moduli ($ytorho=r+y$), and



              $$X=(r+y)cos(fracpi2+xalpha)=(r+y)sin(xalpha),\Y=(r+y)sin(fracpi2+xalpha)-h=(r+y)cos(xalpha)-h.$$



              This way the origin $(0, 0)$ maps to the Cartesian coordinates $(0,r-h)$ and the endpoints $(pm1,0)$ to themselves.




              Note that for very large $r$, $alphaapproxdfrac1r$ and $happrox r$ so that



              $$Xapprox(r+y)frac xrapprox x,$$



              $$Yapprox (r+y)cdot1-happrox y.$$






              share|cite|improve this answer

























                up vote
                0
                down vote










                up vote
                0
                down vote









                WLOG I assume that $P_0=(-1,0)$ and $P_4=(1,0)$ (if not, a translation+rotation+scaling will achieve that).



                Now consider a circle of radius $r$ passing by the two given points. By Pythagoras, its center is at $(0,-h)$ with $h:=sqrtr^2-1$, and the half-aperture angle is $alpha=arcsindfrac1r$.



                Using polar coordinates with the pole at $(0,-h)$, you will map the abscissas to angles ($xtotheta=dfracpi2+xalpha$) and the ordinates to moduli ($ytorho=r+y$), and



                $$X=(r+y)cos(fracpi2+xalpha)=(r+y)sin(xalpha),\Y=(r+y)sin(fracpi2+xalpha)-h=(r+y)cos(xalpha)-h.$$



                This way the origin $(0, 0)$ maps to the Cartesian coordinates $(0,r-h)$ and the endpoints $(pm1,0)$ to themselves.




                Note that for very large $r$, $alphaapproxdfrac1r$ and $happrox r$ so that



                $$Xapprox(r+y)frac xrapprox x,$$



                $$Yapprox (r+y)cdot1-happrox y.$$






                share|cite|improve this answer















                WLOG I assume that $P_0=(-1,0)$ and $P_4=(1,0)$ (if not, a translation+rotation+scaling will achieve that).



                Now consider a circle of radius $r$ passing by the two given points. By Pythagoras, its center is at $(0,-h)$ with $h:=sqrtr^2-1$, and the half-aperture angle is $alpha=arcsindfrac1r$.



                Using polar coordinates with the pole at $(0,-h)$, you will map the abscissas to angles ($xtotheta=dfracpi2+xalpha$) and the ordinates to moduli ($ytorho=r+y$), and



                $$X=(r+y)cos(fracpi2+xalpha)=(r+y)sin(xalpha),\Y=(r+y)sin(fracpi2+xalpha)-h=(r+y)cos(xalpha)-h.$$



                This way the origin $(0, 0)$ maps to the Cartesian coordinates $(0,r-h)$ and the endpoints $(pm1,0)$ to themselves.




                Note that for very large $r$, $alphaapproxdfrac1r$ and $happrox r$ so that



                $$Xapprox(r+y)frac xrapprox x,$$



                $$Yapprox (r+y)cdot1-happrox y.$$







                share|cite|improve this answer















                share|cite|improve this answer



                share|cite|improve this answer








                edited Jul 26 at 10:19


























                answered Jul 26 at 10:14









                Yves Daoust

                111k665203




                111k665203






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2863262%2ftranslate-linear-coordinates-to-circular-space%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?