📄 circtan.m
字号:
% circtan.m - point of tangency between the two circles
%
% Usage: [Gamma,r2] = circtan(c1,r1,c2)
%
% c1,r1 = center and radius of circle 1
% c2 = center and of circle 2
%
% Gamma = point of tangency between the two circles
% r2 = radius of circle 2
% S. J. Orfanidis - 2000 - www.ece.rutgers.edu/~orfanidi/ewa
function [Gamma,r2] = circtan(c1,r1,c2)
if nargin==0, help circtan; return; end
c21 = c2-c1; % vector from c1 to c2
z21 = c21 / abs(c21); % unit vector from c1 to c2
r2 = abs(r1-abs(c21)); % c2 could be inside or outside the c1,r1 circle
Gamma = c1 + r1 * z21;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -