tofang.m

来自「齿轮啮合线的仿真 kriny@163.com」· M 代码 · 共 43 行

M
43
字号
% gear
% unit: mm
% press ang: 20deg
clear;

m=2;
z=50;
h=.5;% 1*m
rb=.5*m*z*cos(20*pi/180);
ra=m*(.5*z+h);
N=10;
delr=(ra-rb)/N;

% cal one side
rk=rb:delr:ra;
alphak=acos(rb./rk);
thetak=tan(alphak)-alphak;

% circle
for n=1:361
    xc(n)=rb*cos(n*pi/180);
    yc(n)=rb*sin(n*pi/180);
end
plot(xc,yc);
hold on;
axis equal
%axis square

% plot one side
n=0;
x=rk.*cos(n*360/z*pi/180+thetak);
y=rk.*sin(n*360/z*pi/180+thetak);
plot(x,y,'r');

% cal ang at contact point of one side
rc=.5*m*z;
alphac=acos(rb/rc);
thetac=tan(alphac)-alphac;
theta_width=2*pi/z/2; 
theta_otherside=thetac*2+theta_width;

theta_sym=theta_otherside/2;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?