# How to draw an arc through 2 known points and tangent to a line

I am using AutoCAD and I was trying to figure out how to draw a circular arc through 2 known point and tangent to a line.

When I look at the circle tools I see the following options:

When I look at the arc options I see the following:

I am able to do it through a convoluted use of parametric constraints, but I cant figure out how to do it from first principals. Is there a way?

What I figured out so far is that the center of the circle will be on the perpendicular bisector (Red Line) of the line between the known points.

Using algebra I can mathematically come up with the center for the two blue circles. And visually I know I want the larger circle. What am I missing to find that center point graphically?

I can do it through parametric constraints, but I thought one should be able to do this with essentially a straight edge and a compass (straight lines and circles).

• Why dont you use constraints? Dec 28 '20 at 16:14
• @joojaa I did try it with constraints and initially that was my only way of getting the solution. NMECH pointed out the 3 point circle with the third point being perpendicular snap option which is far easier than constraints. I know I can find the point mathematically, but I was curious if there was a way to do it from first principals. IE if you only had a straight edge and a compass. (Straight lines and circles) Dec 28 '20 at 22:21
• Well easier depends what you optimize. If you optimize your CAD usage time for designing once then sure. But then autocad constrains suck, truly parametric cads do this easier than the snapping option. Optimizing for drawing does not really optimize the entire design iteration. Anyway i think you can do this with a compass and ruler too 45 degrees come in mind. Dec 29 '20 at 9:00

One option would be to do it through a 3 point circle.

First select the two points and then use the tangent snap to select the third point on the line.

# Finding the snap location algebraically

Assuming:

1. $$(x1,y1)$$ : the coordinates of the 1st point (P1)
2. $$(x2,y2)$$ : the coordinates of the 2nd point (P2)
3. the tangent is horizontal (for simplicity)
4. $$(xs, 0)$$ the snap point is with coordinates (to simplify the equation otherwise its too long).

The way I'd go about it is the following:

1. Find the middle point between the two points and its coordinates $$(x_m,y_m)$$.

$$\left(\frac{x1 + x2}{2}, \frac{y1 + y2}{2}\right)$$

1. Write out the equation for the line perpendicular to the line connecting the two points

$$y_{12,perp} =\frac{y1+y2}{2}-\frac{x2-x1 }{y2-y1}\left(x+\frac{1}{2} (-x1-x2)\right)$$

1. Find the equation for the line perpendicular to the Line (the one you want to be tangent), with one parameter changing (e.g the $$x_L$$ if its horizontal).

$$xT = xC$$

In this particular step because of assumptions 3 and 4 the this equation is a lot simpler. Otherwise it would have looked very much like equation from step 2, but with points P3 and P4 belonging to the tangent. I thought it better to do it this way, because the final equation is almost unusable otherwise.

1. Then assume a point in space ($$x_c,y_c$$). For that point to be the center it should be in equal distance from point 1 ($$x_1,y_1$$), 2 ($$x_1,y_1$$), and the point tangent to the equation. For this subset you will only have 2 unknowns ($$x_c,y_c$$) - because the snap point coincides with the center $$xc$$.

In this case you have the following equations that need to be solved:

$$\begin{cases} \sqrt{(xc-x1)^2+(yc-y1)^2}=yc\\ yc=\frac{y1+y2}{2}-\frac{(x2-x1) \left(\frac{1}{2} (-x1-x2)+xc\right)}{y2-y1} \end{cases}$$

Solving the above system results in: $$xc = \frac{1}{2 x2-2 x1}\left(\frac{x1^2 y1^2}{y1^2-2 y1 y2+y2^2}-\frac{x1^2 y2^2}{y1^2-2 y1 y2+y2^2}-x1^2+\frac{2 y1 \sqrt{x1^4 y1 y2-4 x1^3 x2 y1 y2+6 x1^2 x2^2 y1 y2+x1^2 y1^3 y2-2 x1^2 y1^2 y2^2+x1^2 y1 y2^3-4 x1 x2^3 y1 y2-2 x1 x2 y1^3 y2+4 x1 x2 y1^2 y2^2-2 x1 x2 y1 y2^3+x2^4 y1 y2+x2^2 y1^3 y2-2 x2^2 y1^2 y2^2+x2^2 y1 y2^3}}{y1^2-2 y1 y2+y2^2}-\frac{2 y2 \sqrt{x1^4 y1 y2-4 x1^3 x2 y1 y2+6 x1^2 x2^2 y1 y2+x1^2 y1^3 y2-2 x1^2 y1^2 y2^2+x1^2 y1 y2^3-4 x1 x2^3 y1 y2-2 x1 x2 y1^3 y2+4 x1 x2 y1^2 y2^2-2 x1 x2 y1 y2^3+x2^4 y1 y2+x2^2 y1^3 y2-2 x2^2 y1^2 y2^2+x2^2 y1 y2^3}}{y1^2-2 y1 y2+y2^2}-\frac{2 x1 x2 y1^2}{y1^2-2 y1 y2+y2^2}+\frac{2 x1 x2 y2^2}{y1^2-2 y1 y2+y2^2}+\frac{x2^2 y1^2}{y1^2-2 y1 y2+y2^2}-\frac{x2^2 y2^2}{y1^2-2 y1 y2+y2^2}+x2^2-\frac{y2^4}{y1^2-2 y1 y2+y2^2}+\frac{2 y1 y2^3}{y1^2-2 y1 y2+y2^2}-y1^2+\frac{y1^4}{y1^2-2 y1 y2+y2^2}-\frac{2 y1^3 y2}{y1^2-2 y1 y2+y2^2}+y2^2\right)$$

or a much friendlier form

$$\small{xc= -\frac{\sqrt{y1 y2 (x1-x2)^2 \left(x1^2-2 x1 x2+x2^2+(y1-y2)^2\right)}+x1^2 y2-x1 x2 (y1+y2)+x2^2 y1}{(x1-x2) (y1-y2)}}$$

or

$$\small{xc = \frac{\sqrt{ {y1} {y2} ( {x1}- {x2})^2 \left( {x1}^2-2 {x1} {x2}+ {x2}^2+( {y1}- {y2})^2\right)}+ {x1}^2 (- {y2})+ {x1} {x2} {y1}+ {x1} {x2} {y2}- {x2}^2 {y1}}{( {x1}- {x2}) ( {y1}- {y2})}}$$

You can select one of them using the constraints from the other point.

you can easily extend the idea to a more generic tangent.

• Just tested that out and that definitely works. Do you know how to determine where that point of tangency is without the use of the snap? Dec 25 '20 at 4:38
• I can find it out either analytically or geometrically. The problem is that its xmas and i promised my better half not to bury my head in calculations for at least 2 days. Dec 25 '20 at 4:43
• burying myself in calculations was my christmas gift to my self...hence I do not have a better half Dec 25 '20 at 5:00
• I tried to outline a bit how I'd go about it. Hopefully that helps. Dec 25 '20 at 5:00
• Yeah I did that when I did the algebraic approach. Tossed it into wolfram to save on the hand calculation time. (X1-Xc)^2+(Y1-Yc)^2 =(X2-Xc)^2+(Y2-Yc)^2, Yc^2=(X2-Xc)^2+(Y2-Yc)^2. It graphed a parabola and a straight line and gave to points of intersection. One point corresponded to the center of the small circle which is not the case for this drawing and the other for the center for the large circle. Dec 25 '20 at 5:07

Instead of bothering to draw the construction use the parametric tab to do this do the following:

1. assign a locked constraint to your point and 2 to the tangent line so they don't move by mistake.
2. Draw a arbitrary circle, on the side of points where you want the circle center to be.
3. Select the tangent constraint, click circle and line
4. select the coincident constrain (f11) select point, then hold right mouse button and select object, then click on circle. (if you dont envoke object then it will snap to center)
5. repeat steps in 4 for the other point
6. Done

And you have found the only circle closer to the side where you started your circle that satisfies the constraint. As a bonus you can now do as complex constraints as you wish in future You can now hide the constraints or delete them... whatever. You may want to keep then though in case you need to ever change your model, then it will magically update.

After more than a few days with the wrong key words for a google search, I stumbled on the answer while trying to navigate to the math stack exchange...and the answer was some place completely different:

https://www.geogebra.org/m/CgHVUJs8

Great animation. Basically these are the step to figure it out graphically with the assumed initial setup below:

Step 1

Make the line AB

Step 2

Draw the perpendicular bisector of AB. call the intersection point E and the new line FG.

Step 3

Extend the line AB so it intersects with the tangent line CD. The point of intersection will be point H.

Step 4

Draw a circle centered on E so it passes through point H. (Radius = |EH|)

Step 5

Draw a line from point B that is perpendicular to the line AB. Where this perpendicular line intersects the the circle, call that point J.

Step 6

Draw a circle with radius |BJ| centered on point H. ( |BJ|=|HK| ) Where this circle intersects with the tangent line CD, call the points of intersection L and M.

Step 7

Draw lines perpendicular to the tangent line CD, at points L and M. Call these perpendicular lines LN and MP. Where LN and MP intersect with the line FG mark the points of intersection Q and R.

Step 8

Points Q and R are the two possible centers for a circle or arc passing through points A and B and being tangent to line CD.