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: enter image description here

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.

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

Sometimes a picture is all you need:

enter image description here

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

  • $\begingroup$ I just tested it and my original theory was right. You cemented it with the picture. I tested it by creating radius of d*tan(α/2) and sure enough the tangent is at the bounds of each segment. $\endgroup$ – sinDizzy Oct 12 '17 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.