Syntax
[A,B,exey,w]=tangent2circ(A0,B0,ra,rb)
Input Parameter
A0 : | | Center of circle A |
B0 : | | Center of circle B |
ra : | | radius of circle A |
rb : | | radius of circle B |
Output Parameter
A : | | Positions outer 1 outer 2 inner 1 inner 2 of circle A [4 x 2] |
B : | | Positions outer 1 outer 2 inner 1 inner 2 of circle B [4 x 2] |
exey : | | [ex;ey vector starting at A0 towards B0 |
w : | | angle solutions relative to ex and ey |
Examples
try
tangent2circ([0 0],[15 0],3,6) % 4 Solutions
tangent2circ([0 0],[10 0],6,6) % 2 Solutions
tangent2circ([0 0],[2 0],6,3) % 0 Solutions
tangent2circ([0 0],[4 0],4,2) % 2 Solutions
tangent2circ([0 0],[4 0],2,2) % 2 Solutions touching circle
tangent2circ([0 0],[4 0],1,6) % No Solution
Copyright 2018-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Last html export of this page out of FM database by TL: 2025-09-21