Determining coefficients of a parametrization of an epicycloid given a predefined arc length.












0














I am trying to determine the coefficient q in the parametrization of a epicycloid which gives me the arc length of 4.25. The parametrization can be glimpsed in my attempt of a solution in the following Matlab code.



R=0.5;
r=R/3;
c=(R+r)/r;
t = 0:0.01:2*pi;


fun = @(t,q) sqrt((c.^2).*(r.^2).*sin(t).^2+(c.^2).*(q.^2).*...
(r.^2).*sin(c.*t).^2+(c.^2).*(r.^2).*cos(t).^2+(c.^2).*(q.^2).*...
(r.^2).*cos(c.*t).^2+1);

fun2 = @(q) integral(@(t) fun(t,q),0,2*pi)

qsolve=fsolve(@(q) fun2(q)-4.25, 0)


The problem is that solve can not find any solution. I am very much grateful if someone can help me with this one.



Cheers!










share|cite|improve this question





























    0














    I am trying to determine the coefficient q in the parametrization of a epicycloid which gives me the arc length of 4.25. The parametrization can be glimpsed in my attempt of a solution in the following Matlab code.



    R=0.5;
    r=R/3;
    c=(R+r)/r;
    t = 0:0.01:2*pi;


    fun = @(t,q) sqrt((c.^2).*(r.^2).*sin(t).^2+(c.^2).*(q.^2).*...
    (r.^2).*sin(c.*t).^2+(c.^2).*(r.^2).*cos(t).^2+(c.^2).*(q.^2).*...
    (r.^2).*cos(c.*t).^2+1);

    fun2 = @(q) integral(@(t) fun(t,q),0,2*pi)

    qsolve=fsolve(@(q) fun2(q)-4.25, 0)


    The problem is that solve can not find any solution. I am very much grateful if someone can help me with this one.



    Cheers!










    share|cite|improve this question



























      0












      0








      0







      I am trying to determine the coefficient q in the parametrization of a epicycloid which gives me the arc length of 4.25. The parametrization can be glimpsed in my attempt of a solution in the following Matlab code.



      R=0.5;
      r=R/3;
      c=(R+r)/r;
      t = 0:0.01:2*pi;


      fun = @(t,q) sqrt((c.^2).*(r.^2).*sin(t).^2+(c.^2).*(q.^2).*...
      (r.^2).*sin(c.*t).^2+(c.^2).*(r.^2).*cos(t).^2+(c.^2).*(q.^2).*...
      (r.^2).*cos(c.*t).^2+1);

      fun2 = @(q) integral(@(t) fun(t,q),0,2*pi)

      qsolve=fsolve(@(q) fun2(q)-4.25, 0)


      The problem is that solve can not find any solution. I am very much grateful if someone can help me with this one.



      Cheers!










      share|cite|improve this question















      I am trying to determine the coefficient q in the parametrization of a epicycloid which gives me the arc length of 4.25. The parametrization can be glimpsed in my attempt of a solution in the following Matlab code.



      R=0.5;
      r=R/3;
      c=(R+r)/r;
      t = 0:0.01:2*pi;


      fun = @(t,q) sqrt((c.^2).*(r.^2).*sin(t).^2+(c.^2).*(q.^2).*...
      (r.^2).*sin(c.*t).^2+(c.^2).*(r.^2).*cos(t).^2+(c.^2).*(q.^2).*...
      (r.^2).*cos(c.*t).^2+1);

      fun2 = @(q) integral(@(t) fun(t,q),0,2*pi)

      qsolve=fsolve(@(q) fun2(q)-4.25, 0)


      The problem is that solve can not find any solution. I am very much grateful if someone can help me with this one.



      Cheers!







      numerical-methods numerical-linear-algebra numerical-optimization numerical-calculus






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Nov 13 '18 at 22:59









      John Hughes

      62.4k24090




      62.4k24090










      asked Nov 13 '18 at 22:48









      Torbjörn Olsson

      134




      134






















          3 Answers
          3






          active

          oldest

          votes


















          0














          If you actually evaluate the function you're trying to mess with, suing something like this:



          x = -8:.01:8; 
          s = numel(x);
          y = zeros(s, 1);

          for i = 1:s
          y(i) = fun2(x(i));
          end

          plot(x, y);


          then your resulting plot looks like this:
          enter image description here



          That plot pretty much tells you why you can't make the length be $4.25$ ... because it's pretty much always at least $6$ or $7$.



          Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be. Perhaps the choice $q = 0$ would be a good one, since it seems to be as short as possible. I'll bet it's a circle with radius 1, hence circumference $2pi approx 6.28 > 4.25$.






          share|cite|improve this answer





















          • I see and thank you! So I have the following parametrization for epicycloid: R = 0.5 r = R / 3 c = (R + r) / r (= 3 + 1 = 4) x(t) = c * r * cos(t) - q * r * cos(c * t) y(t) = c * r * sin(t) - q * r * sin(c * t) for 0 <= t <= 2 pi Want to determine q such that the arc length becomes 4.25. Are there any more errors?
            – Torbjörn Olsson
            Nov 13 '18 at 23:46










          • "Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be." Did you do this? I did, and for $q = 0$, I got a circle of radius about $0.66$; that has a circumference of $4.14$, so there's some hope of finding a parameter value $q$ for which you get an arc length of $4.25$. Of course, your function for computing the arclength has to be coded properly; at present it appears not to be, because it returns a value near $8$ for $q = 0$. This is called "debugging", and it's much harder than programming. I suggest you start fresh; it may help.
            – John Hughes
            Nov 14 '18 at 3:59



















          0














          Here is a plot (obtained by a Matlab program I have placed at the bottom of this text) of various curves with parametric equations as you have given them in a comment :



          $$x= cr cos(t) - qr cos(ct), y= cr sin(t) - qr sin(ct)$$



          for $q$ in the range $(0,3)$. Value $q=1$ corresponds to the classical epicycloid . For this value of $q$, the curve length is well under $4.25$.



          Values of $q$ above $1$ yield curves with loops. Do you still consider such curves ?



          enter image description here



          I see at least two problems.



          Do we agree that arc length is computed as $int_0^L sqrt{x(s)'^2+y(s)'^2}ds$ where $s$ is arclength ?



          1) If we assume for a while that your parameter $t$ is arclength (which is not), I am unable to recognize the (square of the) derivative of $x(t) = c*r*cos(t) - q*r*cos(c* t)$ in your "fun" expression. The same for the derivative of $y(t)$.



          2) As said above, the issue is that $t$ isn't arc length...



          Matlab program for the figure :



          clear all;close all;axis equal;hold on;set(gcf,'color','w')
          R = 0.5; r = R/3; c = (R+r)/r;
          t=0:0.001:2*pi;
          plot(c*r*cos(t), c*r*sin(t),'r','linesmoothing','on');
          for q=0.1:0.1:3
          x= c*r*cos(t) - q*r*cos(c*t);
          y= c*r*sin(t) - q*r*sin(c*t) ;
          plot(x,y,'b','linesmoothing','on');
          end;





          share|cite|improve this answer





























            0














            Thank you! I also solved it but I forgot to post it here.



            clc
            clear
            R=0.5;
            r=R/3;
            c=(R+r)/r;



            pfun = @(t,q) sqrt((-c.*r.*sin(t)).^2+(c.*r.*q.sin(ct)).^2+(c.*r.*cos(t)).^2+(-c.*r.*q.cos(ct)).^2);
            fun = @(q) integral(@(t) pfun(t,q),0,2*pi)
            qsolve=fzero(@(q) fun(q) - 4.25,0);



            t=linspace(0,2*pi);

            x = c.*r.*cos(t)-qsolve.*c.*r.cos(ct);
            y = c.*r.*sin(t)-qsolve.*c.*r.sin(ct);
            plot(x,y)
            axis('equal')






            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',
              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%2f2997466%2fdetermining-coefficients-of-a-parametrization-of-an-epicycloid-given-a-predefine%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              If you actually evaluate the function you're trying to mess with, suing something like this:



              x = -8:.01:8; 
              s = numel(x);
              y = zeros(s, 1);

              for i = 1:s
              y(i) = fun2(x(i));
              end

              plot(x, y);


              then your resulting plot looks like this:
              enter image description here



              That plot pretty much tells you why you can't make the length be $4.25$ ... because it's pretty much always at least $6$ or $7$.



              Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be. Perhaps the choice $q = 0$ would be a good one, since it seems to be as short as possible. I'll bet it's a circle with radius 1, hence circumference $2pi approx 6.28 > 4.25$.






              share|cite|improve this answer





















              • I see and thank you! So I have the following parametrization for epicycloid: R = 0.5 r = R / 3 c = (R + r) / r (= 3 + 1 = 4) x(t) = c * r * cos(t) - q * r * cos(c * t) y(t) = c * r * sin(t) - q * r * sin(c * t) for 0 <= t <= 2 pi Want to determine q such that the arc length becomes 4.25. Are there any more errors?
                – Torbjörn Olsson
                Nov 13 '18 at 23:46










              • "Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be." Did you do this? I did, and for $q = 0$, I got a circle of radius about $0.66$; that has a circumference of $4.14$, so there's some hope of finding a parameter value $q$ for which you get an arc length of $4.25$. Of course, your function for computing the arclength has to be coded properly; at present it appears not to be, because it returns a value near $8$ for $q = 0$. This is called "debugging", and it's much harder than programming. I suggest you start fresh; it may help.
                – John Hughes
                Nov 14 '18 at 3:59
















              0














              If you actually evaluate the function you're trying to mess with, suing something like this:



              x = -8:.01:8; 
              s = numel(x);
              y = zeros(s, 1);

              for i = 1:s
              y(i) = fun2(x(i));
              end

              plot(x, y);


              then your resulting plot looks like this:
              enter image description here



              That plot pretty much tells you why you can't make the length be $4.25$ ... because it's pretty much always at least $6$ or $7$.



              Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be. Perhaps the choice $q = 0$ would be a good one, since it seems to be as short as possible. I'll bet it's a circle with radius 1, hence circumference $2pi approx 6.28 > 4.25$.






              share|cite|improve this answer





















              • I see and thank you! So I have the following parametrization for epicycloid: R = 0.5 r = R / 3 c = (R + r) / r (= 3 + 1 = 4) x(t) = c * r * cos(t) - q * r * cos(c * t) y(t) = c * r * sin(t) - q * r * sin(c * t) for 0 <= t <= 2 pi Want to determine q such that the arc length becomes 4.25. Are there any more errors?
                – Torbjörn Olsson
                Nov 13 '18 at 23:46










              • "Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be." Did you do this? I did, and for $q = 0$, I got a circle of radius about $0.66$; that has a circumference of $4.14$, so there's some hope of finding a parameter value $q$ for which you get an arc length of $4.25$. Of course, your function for computing the arclength has to be coded properly; at present it appears not to be, because it returns a value near $8$ for $q = 0$. This is called "debugging", and it's much harder than programming. I suggest you start fresh; it may help.
                – John Hughes
                Nov 14 '18 at 3:59














              0












              0








              0






              If you actually evaluate the function you're trying to mess with, suing something like this:



              x = -8:.01:8; 
              s = numel(x);
              y = zeros(s, 1);

              for i = 1:s
              y(i) = fun2(x(i));
              end

              plot(x, y);


              then your resulting plot looks like this:
              enter image description here



              That plot pretty much tells you why you can't make the length be $4.25$ ... because it's pretty much always at least $6$ or $7$.



              Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be. Perhaps the choice $q = 0$ would be a good one, since it seems to be as short as possible. I'll bet it's a circle with radius 1, hence circumference $2pi approx 6.28 > 4.25$.






              share|cite|improve this answer












              If you actually evaluate the function you're trying to mess with, suing something like this:



              x = -8:.01:8; 
              s = numel(x);
              y = zeros(s, 1);

              for i = 1:s
              y(i) = fun2(x(i));
              end

              plot(x, y);


              then your resulting plot looks like this:
              enter image description here



              That plot pretty much tells you why you can't make the length be $4.25$ ... because it's pretty much always at least $6$ or $7$.



              Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be. Perhaps the choice $q = 0$ would be a good one, since it seems to be as short as possible. I'll bet it's a circle with radius 1, hence circumference $2pi approx 6.28 > 4.25$.







              share|cite|improve this answer












              share|cite|improve this answer



              share|cite|improve this answer










              answered Nov 13 '18 at 23:08









              John Hughes

              62.4k24090




              62.4k24090












              • I see and thank you! So I have the following parametrization for epicycloid: R = 0.5 r = R / 3 c = (R + r) / r (= 3 + 1 = 4) x(t) = c * r * cos(t) - q * r * cos(c * t) y(t) = c * r * sin(t) - q * r * sin(c * t) for 0 <= t <= 2 pi Want to determine q such that the arc length becomes 4.25. Are there any more errors?
                – Torbjörn Olsson
                Nov 13 '18 at 23:46










              • "Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be." Did you do this? I did, and for $q = 0$, I got a circle of radius about $0.66$; that has a circumference of $4.14$, so there's some hope of finding a parameter value $q$ for which you get an arc length of $4.25$. Of course, your function for computing the arclength has to be coded properly; at present it appears not to be, because it returns a value near $8$ for $q = 0$. This is called "debugging", and it's much harder than programming. I suggest you start fresh; it may help.
                – John Hughes
                Nov 14 '18 at 3:59


















              • I see and thank you! So I have the following parametrization for epicycloid: R = 0.5 r = R / 3 c = (R + r) / r (= 3 + 1 = 4) x(t) = c * r * cos(t) - q * r * cos(c * t) y(t) = c * r * sin(t) - q * r * sin(c * t) for 0 <= t <= 2 pi Want to determine q such that the arc length becomes 4.25. Are there any more errors?
                – Torbjörn Olsson
                Nov 13 '18 at 23:46










              • "Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be." Did you do this? I did, and for $q = 0$, I got a circle of radius about $0.66$; that has a circumference of $4.14$, so there's some hope of finding a parameter value $q$ for which you get an arc length of $4.25$. Of course, your function for computing the arclength has to be coded properly; at present it appears not to be, because it returns a value near $8$ for $q = 0$. This is called "debugging", and it's much harder than programming. I suggest you start fresh; it may help.
                – John Hughes
                Nov 14 '18 at 3:59
















              I see and thank you! So I have the following parametrization for epicycloid: R = 0.5 r = R / 3 c = (R + r) / r (= 3 + 1 = 4) x(t) = c * r * cos(t) - q * r * cos(c * t) y(t) = c * r * sin(t) - q * r * sin(c * t) for 0 <= t <= 2 pi Want to determine q such that the arc length becomes 4.25. Are there any more errors?
              – Torbjörn Olsson
              Nov 13 '18 at 23:46




              I see and thank you! So I have the following parametrization for epicycloid: R = 0.5 r = R / 3 c = (R + r) / r (= 3 + 1 = 4) x(t) = c * r * cos(t) - q * r * cos(c * t) y(t) = c * r * sin(t) - q * r * sin(c * t) for 0 <= t <= 2 pi Want to determine q such that the arc length becomes 4.25. Are there any more errors?
              – Torbjörn Olsson
              Nov 13 '18 at 23:46












              "Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be." Did you do this? I did, and for $q = 0$, I got a circle of radius about $0.66$; that has a circumference of $4.14$, so there's some hope of finding a parameter value $q$ for which you get an arc length of $4.25$. Of course, your function for computing the arclength has to be coded properly; at present it appears not to be, because it returns a value near $8$ for $q = 0$. This is called "debugging", and it's much harder than programming. I suggest you start fresh; it may help.
              – John Hughes
              Nov 14 '18 at 3:59




              "Perhaps you need to draw a picture of one of your epicycloids to figure out just how short it could possible be." Did you do this? I did, and for $q = 0$, I got a circle of radius about $0.66$; that has a circumference of $4.14$, so there's some hope of finding a parameter value $q$ for which you get an arc length of $4.25$. Of course, your function for computing the arclength has to be coded properly; at present it appears not to be, because it returns a value near $8$ for $q = 0$. This is called "debugging", and it's much harder than programming. I suggest you start fresh; it may help.
              – John Hughes
              Nov 14 '18 at 3:59











              0














              Here is a plot (obtained by a Matlab program I have placed at the bottom of this text) of various curves with parametric equations as you have given them in a comment :



              $$x= cr cos(t) - qr cos(ct), y= cr sin(t) - qr sin(ct)$$



              for $q$ in the range $(0,3)$. Value $q=1$ corresponds to the classical epicycloid . For this value of $q$, the curve length is well under $4.25$.



              Values of $q$ above $1$ yield curves with loops. Do you still consider such curves ?



              enter image description here



              I see at least two problems.



              Do we agree that arc length is computed as $int_0^L sqrt{x(s)'^2+y(s)'^2}ds$ where $s$ is arclength ?



              1) If we assume for a while that your parameter $t$ is arclength (which is not), I am unable to recognize the (square of the) derivative of $x(t) = c*r*cos(t) - q*r*cos(c* t)$ in your "fun" expression. The same for the derivative of $y(t)$.



              2) As said above, the issue is that $t$ isn't arc length...



              Matlab program for the figure :



              clear all;close all;axis equal;hold on;set(gcf,'color','w')
              R = 0.5; r = R/3; c = (R+r)/r;
              t=0:0.001:2*pi;
              plot(c*r*cos(t), c*r*sin(t),'r','linesmoothing','on');
              for q=0.1:0.1:3
              x= c*r*cos(t) - q*r*cos(c*t);
              y= c*r*sin(t) - q*r*sin(c*t) ;
              plot(x,y,'b','linesmoothing','on');
              end;





              share|cite|improve this answer


























                0














                Here is a plot (obtained by a Matlab program I have placed at the bottom of this text) of various curves with parametric equations as you have given them in a comment :



                $$x= cr cos(t) - qr cos(ct), y= cr sin(t) - qr sin(ct)$$



                for $q$ in the range $(0,3)$. Value $q=1$ corresponds to the classical epicycloid . For this value of $q$, the curve length is well under $4.25$.



                Values of $q$ above $1$ yield curves with loops. Do you still consider such curves ?



                enter image description here



                I see at least two problems.



                Do we agree that arc length is computed as $int_0^L sqrt{x(s)'^2+y(s)'^2}ds$ where $s$ is arclength ?



                1) If we assume for a while that your parameter $t$ is arclength (which is not), I am unable to recognize the (square of the) derivative of $x(t) = c*r*cos(t) - q*r*cos(c* t)$ in your "fun" expression. The same for the derivative of $y(t)$.



                2) As said above, the issue is that $t$ isn't arc length...



                Matlab program for the figure :



                clear all;close all;axis equal;hold on;set(gcf,'color','w')
                R = 0.5; r = R/3; c = (R+r)/r;
                t=0:0.001:2*pi;
                plot(c*r*cos(t), c*r*sin(t),'r','linesmoothing','on');
                for q=0.1:0.1:3
                x= c*r*cos(t) - q*r*cos(c*t);
                y= c*r*sin(t) - q*r*sin(c*t) ;
                plot(x,y,'b','linesmoothing','on');
                end;





                share|cite|improve this answer
























                  0












                  0








                  0






                  Here is a plot (obtained by a Matlab program I have placed at the bottom of this text) of various curves with parametric equations as you have given them in a comment :



                  $$x= cr cos(t) - qr cos(ct), y= cr sin(t) - qr sin(ct)$$



                  for $q$ in the range $(0,3)$. Value $q=1$ corresponds to the classical epicycloid . For this value of $q$, the curve length is well under $4.25$.



                  Values of $q$ above $1$ yield curves with loops. Do you still consider such curves ?



                  enter image description here



                  I see at least two problems.



                  Do we agree that arc length is computed as $int_0^L sqrt{x(s)'^2+y(s)'^2}ds$ where $s$ is arclength ?



                  1) If we assume for a while that your parameter $t$ is arclength (which is not), I am unable to recognize the (square of the) derivative of $x(t) = c*r*cos(t) - q*r*cos(c* t)$ in your "fun" expression. The same for the derivative of $y(t)$.



                  2) As said above, the issue is that $t$ isn't arc length...



                  Matlab program for the figure :



                  clear all;close all;axis equal;hold on;set(gcf,'color','w')
                  R = 0.5; r = R/3; c = (R+r)/r;
                  t=0:0.001:2*pi;
                  plot(c*r*cos(t), c*r*sin(t),'r','linesmoothing','on');
                  for q=0.1:0.1:3
                  x= c*r*cos(t) - q*r*cos(c*t);
                  y= c*r*sin(t) - q*r*sin(c*t) ;
                  plot(x,y,'b','linesmoothing','on');
                  end;





                  share|cite|improve this answer












                  Here is a plot (obtained by a Matlab program I have placed at the bottom of this text) of various curves with parametric equations as you have given them in a comment :



                  $$x= cr cos(t) - qr cos(ct), y= cr sin(t) - qr sin(ct)$$



                  for $q$ in the range $(0,3)$. Value $q=1$ corresponds to the classical epicycloid . For this value of $q$, the curve length is well under $4.25$.



                  Values of $q$ above $1$ yield curves with loops. Do you still consider such curves ?



                  enter image description here



                  I see at least two problems.



                  Do we agree that arc length is computed as $int_0^L sqrt{x(s)'^2+y(s)'^2}ds$ where $s$ is arclength ?



                  1) If we assume for a while that your parameter $t$ is arclength (which is not), I am unable to recognize the (square of the) derivative of $x(t) = c*r*cos(t) - q*r*cos(c* t)$ in your "fun" expression. The same for the derivative of $y(t)$.



                  2) As said above, the issue is that $t$ isn't arc length...



                  Matlab program for the figure :



                  clear all;close all;axis equal;hold on;set(gcf,'color','w')
                  R = 0.5; r = R/3; c = (R+r)/r;
                  t=0:0.001:2*pi;
                  plot(c*r*cos(t), c*r*sin(t),'r','linesmoothing','on');
                  for q=0.1:0.1:3
                  x= c*r*cos(t) - q*r*cos(c*t);
                  y= c*r*sin(t) - q*r*sin(c*t) ;
                  plot(x,y,'b','linesmoothing','on');
                  end;






                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Nov 18 '18 at 8:40









                  Jean Marie

                  28.8k41949




                  28.8k41949























                      0














                      Thank you! I also solved it but I forgot to post it here.



                      clc
                      clear
                      R=0.5;
                      r=R/3;
                      c=(R+r)/r;



                      pfun = @(t,q) sqrt((-c.*r.*sin(t)).^2+(c.*r.*q.sin(ct)).^2+(c.*r.*cos(t)).^2+(-c.*r.*q.cos(ct)).^2);
                      fun = @(q) integral(@(t) pfun(t,q),0,2*pi)
                      qsolve=fzero(@(q) fun(q) - 4.25,0);



                      t=linspace(0,2*pi);

                      x = c.*r.*cos(t)-qsolve.*c.*r.cos(ct);
                      y = c.*r.*sin(t)-qsolve.*c.*r.sin(ct);
                      plot(x,y)
                      axis('equal')






                      share|cite|improve this answer


























                        0














                        Thank you! I also solved it but I forgot to post it here.



                        clc
                        clear
                        R=0.5;
                        r=R/3;
                        c=(R+r)/r;



                        pfun = @(t,q) sqrt((-c.*r.*sin(t)).^2+(c.*r.*q.sin(ct)).^2+(c.*r.*cos(t)).^2+(-c.*r.*q.cos(ct)).^2);
                        fun = @(q) integral(@(t) pfun(t,q),0,2*pi)
                        qsolve=fzero(@(q) fun(q) - 4.25,0);



                        t=linspace(0,2*pi);

                        x = c.*r.*cos(t)-qsolve.*c.*r.cos(ct);
                        y = c.*r.*sin(t)-qsolve.*c.*r.sin(ct);
                        plot(x,y)
                        axis('equal')






                        share|cite|improve this answer
























                          0












                          0








                          0






                          Thank you! I also solved it but I forgot to post it here.



                          clc
                          clear
                          R=0.5;
                          r=R/3;
                          c=(R+r)/r;



                          pfun = @(t,q) sqrt((-c.*r.*sin(t)).^2+(c.*r.*q.sin(ct)).^2+(c.*r.*cos(t)).^2+(-c.*r.*q.cos(ct)).^2);
                          fun = @(q) integral(@(t) pfun(t,q),0,2*pi)
                          qsolve=fzero(@(q) fun(q) - 4.25,0);



                          t=linspace(0,2*pi);

                          x = c.*r.*cos(t)-qsolve.*c.*r.cos(ct);
                          y = c.*r.*sin(t)-qsolve.*c.*r.sin(ct);
                          plot(x,y)
                          axis('equal')






                          share|cite|improve this answer












                          Thank you! I also solved it but I forgot to post it here.



                          clc
                          clear
                          R=0.5;
                          r=R/3;
                          c=(R+r)/r;



                          pfun = @(t,q) sqrt((-c.*r.*sin(t)).^2+(c.*r.*q.sin(ct)).^2+(c.*r.*cos(t)).^2+(-c.*r.*q.cos(ct)).^2);
                          fun = @(q) integral(@(t) pfun(t,q),0,2*pi)
                          qsolve=fzero(@(q) fun(q) - 4.25,0);



                          t=linspace(0,2*pi);

                          x = c.*r.*cos(t)-qsolve.*c.*r.cos(ct);
                          y = c.*r.*sin(t)-qsolve.*c.*r.sin(ct);
                          plot(x,y)
                          axis('equal')







                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered Dec 2 '18 at 12:53









                          Torbjörn Olsson

                          134




                          134






























                              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.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • 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.


                              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%2f2997466%2fdetermining-coefficients-of-a-parametrization-of-an-epicycloid-given-a-predefine%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

                              Wiesbaden

                              Marschland

                              Dieringhausen