# Calculate min/max radii of circle tangent to two lines

I am tackling a problem very similar to Calculate center of circle tangent to two lines in space. In fact I use the response from @ja72 to create a circle tangent to two existing lines. Works great.

My issue here is that my two segments are of varying length and on occasion the tangent is outside one of the segments. The geometry looks like this:

Right now my radius is 4500 units. I know the segment lengths and the angle between them. There has to be a way I can determine the min/max radii that would satisfy tangency to the two segments without going outside their bounds. I just cant seem to wrap my head around the math.

Would the max radius be d*tan(α/2)? Where d is the smaller segment length.

• No: max radius is $\displaystyle{d\over\tan(α/2)}$. – Aretino Oct 11 '17 at 16:30
• Tested it and Radius_max = d*tan(α/2). thanks. – sinDizzy Oct 12 '17 at 17:02
• Oh: I assumed that $\alpha$ was the angle at the center of the circle! – Aretino Oct 12 '17 at 17:24
• Yeah I see why that could be misinterpreted. I should have put that in the graphic. Thanks. – sinDizzy Oct 12 '17 at 18:16

$\frac rd=\tan\frac\alpha2$.