Epicycloid curve calculating arch length using integral method

1 view (last 30 days)
Im trying to calculate the length of the Epicycloid curve.
i have the x and y coordinates right and i get the correct looking plot, but cant figure out how to calculate the length of the epicycloid curve.
I already tried to calculate, but didnt get results that make sense.
Any help would be greatly appreciated.
Here is a picture of what im calculating:
clear all
R=8;
L=6;
Alfa=2*pi;
Bertta=4*pi;
T=2*pi/Alfa;
syms t
alfa0=Alfa*t;
beta0=Bertta*t;
%%%%%%%%%%%%%%%%%%% %R Coordinates
x0(t)=R*cos(alfa0);
y0(t)=R*sin(alfa0);
%%%%%%%%%%%%%%%%%% %L Coordinates
x(t)=x0(t)+L*cos(alfa0+beta0);
y(t)=y0(t)+L*sin(alfa0+beta0);
%
%x1(t)=diff(x,t)
%y1(t)=diff(y,t)
%t0=2;
%dx=x1(t0)
%dy=y1(t0)
%s0 = @(t) sqrt( ( R.*cosd(t)+L.*cosd(3.*t) ).^2 + (R.*sind(t)+L.*sind(3.*t)).^2);
%s = integral(s0,0,2*pi)
%pit = sqrt(1+(dy/dx).^2*dx)
%lenght = integral(pit,0,2*pi)
fplot(x,y,[0,T],'linewidth',2)
title(['R = ',num2str(R),', L = ',num2str(L),', s = ',num2str(5)])
hold off
grid
axis equal
xlabel('x')
ylabel('y')

Accepted Answer

Torsten
Torsten on 7 Feb 2023
curvelength = vpaintegral(sqrt(diff(x,t)^2+diff(y,t)^2),t,0,T)

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!