Determining coefficients of a parametrization of an epicycloid given a predefined arc length.
up vote
0
down vote
favorite
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
add a comment |
up vote
0
down vote
favorite
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
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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
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
numerical-methods numerical-linear-algebra numerical-optimization numerical-calculus
edited Nov 13 at 22:59
John Hughes
61.4k24089
61.4k24089
asked Nov 13 at 22:48
Torbjörn Olsson
11
11
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
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:
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$.
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 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 at 3:59
add a comment |
up vote
0
down vote
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 ?
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;
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
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:
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$.
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 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 at 3:59
add a comment |
up vote
0
down vote
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:
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$.
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 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 at 3:59
add a comment |
up vote
0
down vote
up vote
0
down vote
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:
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$.
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:
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$.
answered Nov 13 at 23:08
John Hughes
61.4k24089
61.4k24089
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 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 at 3:59
add a comment |
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 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 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 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 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 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 at 3:59
add a comment |
up vote
0
down vote
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 ?
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;
add a comment |
up vote
0
down vote
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 ?
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;
add a comment |
up vote
0
down vote
up vote
0
down vote
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 ?
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;
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 ?
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;
answered Nov 18 at 8:40
Jean Marie
28.1k41848
28.1k41848
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
Required, but never shown
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
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
Required, but never shown
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
Required, but never shown
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
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