フィルターのクリア

Epicycloid curve calculating arch length using integral method

1 回表示 (過去 30 日間)
pauli relanderi
pauli relanderi 2023 年 2 月 7 日
コメント済み: pauli relanderi 2023 年 2 月 8 日
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')

採用された回答

Torsten
Torsten 2023 年 2 月 7 日
curvelength = vpaintegral(sqrt(diff(x,t)^2+diff(y,t)^2),t,0,T)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by