translate linear coordinates to circular space
Clash 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).
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)
coordinate-systems transformation
add a comment |Â
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).
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)
coordinate-systems transformation
add a comment |Â
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).
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)
coordinate-systems transformation
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).
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)
coordinate-systems transformation
edited Jul 26 at 9:54


Kenta S
1,1371418
1,1371418
asked Jul 26 at 9:47
Hoff
1012
1012
add a comment |Â
add a comment |Â
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.$$
add a comment |Â
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.$$
add a comment |Â
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.$$
add a comment |Â
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.$$
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.$$
edited Jul 26 at 10:19
answered Jul 26 at 10:14
Yves Daoust
111k665203
111k665203
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password