How to make curve fitting by spline between two Arcs
4 views (last 30 days)
Show older comments
If i would like to get spline equation the fits the formula below "cycloidal pinion" as i would like to make an arc in tip of the tooth how to make it?
% Define Parameters
pitchDiameter = 6; % Diameter of the rolling circle
rollerDiameter = 0.75; % Diameter of a smaller circle centered on the focal point of the rolling circle
noOfRollers = 6; % number of rollers (teeth) in pinion
noOfTeeth = 5; % desired number of teeth in rack assembly
webThickness = 2; % distance from center of roller at lowest point, and bottom edge of rack
% Calculated Constants
pi_val = pi;
rollerRadius = rollerDiameter / 2;
pitchRadius = pitchDiameter / 2;
pitchCircumference = pitchDiameter * pi_val;
% Cycloid Parametric Equations
theta = linspace(0, 2*pi_val, 100); % Create a range of angles
xValuesA = pitchRadius * (theta - sin(theta)); % X values for cycloid
yValuesA = pitchRadius * (1 - cos(theta)); % Y values for cycloid
% Offset Cycloid
offsetSecondCycloid = @(input) -input + (pitchCircumference / noOfRollers);
xValuesB = offsetSecondCycloid(xValuesA);
yValuesB = yValuesA;
% Plot Basic and Offset Cycloids
figure;
plot(xValuesA, yValuesA, '--', xValuesB, yValuesB, '--');
title('Basic and Offset Cycloid Curves');
xlabel('X');
ylabel('Y');
axis equal;
grid on;
hold on;
0 Comments
Answers (1)
William Rose
on 26 May 2024
If you connect the two curves with a semicircle, then the first derivatives match at the connecting points. However, the radii of curvature do not match at the connecting points. See green curve below.
pitchRadius = 3; % radius of the rolling circle
noOfRollers = 6; % number of rollers (teeth) in pinion
% Cycloid Parametric Equations
theta = linspace(0, 2*pi, 100); % Create a range of angles
xValuesA = pitchRadius * (theta - sin(theta)); % X values for cycloid
yValuesA = pitchRadius * (1 - cos(theta)); % Y values for cycloid
% Offset Cycloid
offsetSecondCycloid = @(input) -input + pitchRadius*2*pi/noOfRollers;
xValuesB = offsetSecondCycloid(xValuesA);
yValuesB = yValuesA;
% Connectors
r1=pitchRadius*pi/noOfRollers; % semicrcle radius
xConnCtr=r1; % x coordinate of semicircle center
xConn=xConnCtr+r1*cos(theta/2); % x coords of semicircle
yConn1=-r1*sin(theta/2); % y coords of semicircle
% Plot Basic & Offset Cycloids & Connector
figure;
plot(xValuesA, yValuesA,'-r',xValuesB,yValuesB,'-b',xConn,yConn1,'-g');
title('Basic and Offset Cycloid Curves'); xlabel('X'); ylabel('Y');
legend('Basic','Offset','Semicircle');
axis equal; grid on; hold on
You do not use constants rollerDiameter, noOfTeeth, or webThickness in your calculations. Please explain what they represent - perhaps a diagram will make it clear. I do not understand what you mean by "i would like to make an arc in tip of the tooth how to make it".
A protracted, or prolate, cycloid is generated by
where R2>R1. When R2=R1, these equations generate a standard cycloid.
The prolate cycloid looks similar to the two segments you drew, but it has a smooth connecting portion. See plot below.
R1=3; R2=4;
theta=-pi/2:pi/100:5*pi/2;
x1=R1*theta-R1*sin(theta); % standard cycloid
y1=R1-R1*cos(theta); % standard cycloid
x2=R1*theta-R2*sin(theta); % prolate cycloid
y2=R1-R2*cos(theta); % prolate cycloid
figure
plot(x1,y1,'-r',x2,y2,'-b');
grid on; axis equal; legend('Standard','Prolate'); title('Cycloids')
0 Comments
See Also
Categories
Find more on Splines in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!