- #1
Anachronist
Gold Member
- 119
- 58
- TL;DR Summary
- Find center of a circle tangent to perpendicular lines x=a and y=b, and also tangent to a circle of radius r at the origin.
I'm trying to solve this for a model I'm making in OpenSCAD.
Given a circle of radius r centered on the origin, and two perpendicular lines at x=a and y=b, where is the center (x1,y1) of a circle that is tangent to both lines and the centered circle?
Here's a picture:
I thought it would be easy, like solving for a circle that intersects 3 points, but there's something I'm not getting here. It's been 4 decades since I had to solve problems like this.
I know that the distance between (0,0) and (x1,y1) should be the sum of the two radii. I could solve it iteratively, but it feels like there should be a closed-form solution here.
Given a circle of radius r centered on the origin, and two perpendicular lines at x=a and y=b, where is the center (x1,y1) of a circle that is tangent to both lines and the centered circle?
Here's a picture:
I thought it would be easy, like solving for a circle that intersects 3 points, but there's something I'm not getting here. It's been 4 decades since I had to solve problems like this.
I know that the distance between (0,0) and (x1,y1) should be the sum of the two radii. I could solve it iteratively, but it feels like there should be a closed-form solution here.