I came across this problem while looking for a solution to a different drafting question and thought it would be an interesting challenge when I had time to dig in deeper to parameterization of AutoCAD drawings.

The basic problem based on the image below is to determine the length $|\overline{\rm BC}|$ in order to have the perimeter total to 30'. I can set $|\overline{\rm BC}|$ up to be a function so in the future I changed the perimeter to 20', and $|\overline{\rm BC}|$ would update automatically.

enter image description here

I was able to go the other way quite easily...determining the length of the red line with a given $|\overline{\rm BC}|$ but could not figure out how to pull it out of the trig functions I used.

  1. r = $|\overline{\rm AC}|$ = 56/2 = 28"
  2. $\frac{|\overline{\rm BC}|}{|\overline{\rm AC}|}=Tan(\angle BAC)$
  3. $\angle BAC=ATAN(\frac{|\overline{\rm BC}|}{|\overline{\rm AC}|})$
  4. Arc Length CAD = $2*\pi*r*\frac{360-2*\angle BAC}{360}$

Putting it all together I got the following

  1. Perimeter $L = 2*|\overline{\rm BC}|+$ Arc Length CAD

    $L= 2*|\overline{\rm BC}|+2*\pi*r*\frac{360-2*\angle BAC}{360}$

sub 3 -> 5

  1. $L= 2*|\overline{\rm BC}|+2*\pi*r*\frac{360-2*\left(ATAN\left(\frac{|\overline{\rm BC}|}{|\overline{\rm AC}|}\right)\right)}{360}$

So if I know $L=360"=30'$, how do I solve for $|\overline{\rm BC}|$? I could not figure out how to pull $|\overline{\rm BC}|$ out from the $ATAN$ function.

Is there a way to do this with out using a trig function? Not even sure if my approach is a good one.

And just in case it is not clear:

  • the arc is tangent to $\overline{\rm BC}$ and $\overline{\rm BD}$ at their intersect/end points C and D.
  • $|\overline{\rm BC}| = |\overline{\rm BC}|$

Through trial and error I can figure out $|\overline{\rm BC}|$ is 130.08129 roughly, but that does not help me remember my math courses from a couple of decades ago. Nor does it help me get an equation.

Please suggest better tagging if appropriate.

A list of supported AutoCAD math functions can be found here

Update 2021/12/07 01:41

So I have been continuing to work on this problem and I feel like I am chasing my tail. In an effort to make it easier on myself, I opted to put point A at $(0,0)$ and B at $(x_b, 0)$. I was hoping the zero values would make terms disappear and potentially simplify me finding an answer.

I started over with the following:

Equation of the circle

$x^2+y^2 = r^2$

Point C is on the circle therefore:

$x_c^2+y_c^2 = r^2$ (1)

The radius is a given:


The equation for $|\overline{\rm BC}|$ is:

$y = m_{BC}*x + b$

The slope of the line m is:

$m_{BC}=\Delta y/\Delta x = \frac{y_c-y_b}{x_c-x_b}$

The slope of the line $|\overline{\rm AC}|$:

$m_{AC}=\frac{-1}{m_{BC}} = \frac{x_b-x_c}{y_c-y_b}$

Equation of the line for $|\overline{\rm AC}|$ is:


$b=0$ because it is passing through the origin

substituting point C coordinates in:

$y_c=\frac{x_b-x_c}{y_c-y_b}*x_c + 0$

Alternatively the slope of $|\overline{\rm AC}|$ can also be expressed in terms of Point A and C:

$m_{AC}= \frac{\Delta y}{\Delta x} = \frac{y_c-y_a}{x_c-x_a}$

so equating the two $m_{AC}$ formulas gives:

$\frac{x_b-x_c}{y_c-y_b} = \frac{y_c-y_a}{x_c-x_a}$

knowing that $y_a , x_a, y_b$ all $= 0$, the formula works out to

$y_c^2=-x_c^2+x_b*x_c$ (2)

ok, not sure it that is helpful or not as all those terms I need to find. Currently thinking system of equations. 3 equations for 3 unknowns.

The length of line $|\overline{\rm BC}|$ is

$|BC| = \sqrt{\Delta x^2+\Delta y^2} = \sqrt{(x_c-x_b)^2+(y_c-y_b)^2}$

Since $y_b=0$

$|BC| =\sqrt{(x_c-x_b)^2+y_c^2}$

Not quite sure I know where I am going with that but figure I need to tie in the perimeter equation which will be something like:

Let perimeter = $L$

$L = 2*\sqrt{(x_c-x_b)^2+y_c^2} + $ Arc Length

So then I went on to try and figure out Arc Length and decided to go the calculus route based on a comment by Clayton. I found some information that said the formula for arc length was

Arc Length = $\int_{a}^{b} \sqrt{1+[f'(x)]^2} \,dx$

So after scratching my head a bit, and trying to remember how to take a derivative, I decided to head over to wolfram alpha to let it do the work for me.

I thought I could get half the arc length from $(-r,0)$ to $(x_c,y_c)$ then double the result:

so first I rearranged formula (1) in terms of y. And since I am only dealing with he top half of the circle, I only need to deal with positive roots.

$y = f(x) = \sqrt{r^2-x^2}$

$f'(x) = -\frac{x}{\sqrt{r^2-x^2}}$

Substituting $f'(x)$ in to the arc length function:

Arc Length = $2*\int_{-r}^{x_c} \sqrt{1+[-\frac{x}{\sqrt{r^2-x^2}}]^2} \,dx$

and according to Wolfram Alpha my integral comes out to

Arc Length = $2*\left(\sqrt{\frac{r^2}{r^2-(-r)^2}}*\sqrt{r^2-(-r)^2}*atan\left(\frac{(-r)}{\sqrt{r^2-(-r)^2}}\right) -\sqrt{\frac{r^2}{r^2-x_C^2}}*\sqrt{r^2-x_C^2}*atan\left(\frac{x_C}{\sqrt{r^2-x_C^2}}\right)\right)$

PROBLEM... $r^2-(-r)^2 = 0$ and dividing by $0$ is undefined

Update 21/12/07 06:05

Couldn't sleep so back looking at this. Was just thinking about the following portion from where I left off:


Does it really matter that the denominators work out to $0$ when when they wind up getting multiplied by $0$? Isn't anything multiplied by $0$ equal to $0$? If that is the case then the arc length would work out to be:

Arc Length $= 2*\left(-\sqrt{\frac{r^2}{r^2-x_C^2}}*\sqrt{r^2-x_C^2}*atan\left(\frac{x_C}{\sqrt{r^2-x_C^2}}\right)\right)$


$L = 2*\left(\sqrt{(x_c-x_b)^2+y_c^2} - \sqrt{\frac{r^2}{r^2-x_C^2}}*\sqrt{r^2-x_C^2}*atan\left(\frac{x_C}{\sqrt{r^2-x_C^2}}\right)\right)$

So I am a little worried with that minus sign in front of the arc length formula. Doesn't feel right. That and I have a variable inside a trig function again which I was hoping to avoid.

I just realized that if I integrated from $x_c$ to $-r$ instead then the formula would be positive. Basically the order of integration is implying a direction and I just need the absolute value (scalar?). Which means I really have:

Arc Length $= 2*\left(\sqrt{\frac{r^2}{r^2-x_C^2}}*\sqrt{r^2-x_C^2}*atan\left(\frac{x_C}{\sqrt{r^2-x_C^2}}\right)\right)$


$L = 2*\left(\sqrt{(x_c-x_b)^2+y_c^2} + \sqrt{\frac{r^2}{r^2-x_C^2}}*\sqrt{r^2-x_C^2}*atan\left(\frac{x_C}{\sqrt{r^2-x_C^2}}\right)\right)$

  • $\begingroup$ Out of curiosity, are you restricting solutions to any specific branch of mathematics? That is, do you want a purely geometric solution or are solutions involving calculus also acceptable? (For clarity: I don’t have a solution in mind. I’m just asking so that if it isn’t solved by the time that I can sit down and spend a few minutes on it, I know what tools are available). $\endgroup$
    – Clayton
    Dec 6, 2021 at 5:01
  • $\begingroup$ @Clayton Good question...in the end I am going to want something I can easily enter into AutoCAD, so I can't have integral or derivative operations in the final equation, but I see not harm in using them as part of the process to get to final equation. $\endgroup$
    – Forward Ed
    Dec 6, 2021 at 5:05
  • $\begingroup$ @Forward Ed Isn't the $\arctan$ function available in the supported list of AutoCAD functions already? $\endgroup$ Dec 6, 2021 at 5:48
  • $\begingroup$ @AspiringMathematician Yes it is available, but I and trying to figure out how to solve for |BC|. ie |BC| = L/2 - Pi * r * (360-2*(ATAN(|BC|/|AC|)))/360. But in what I just did I still have |BC| on both sides. $\endgroup$
    – Forward Ed
    Dec 6, 2021 at 6:01
  • $\begingroup$ Oh right. Okay I get it now. $\endgroup$ Dec 6, 2021 at 6:07

1 Answer 1


In this answer, we give an equation, which expresses $BC$ in terms of $L$ and $r$. Please note that this equation is valid if and only if $L\ge\left(4+\pi\right)r$. However, the accuracy of of the value of $BC$ is not that good for $L\le 8\pi r$. Because we do not have much experience in AutoCAD, the expression for $BC$ is given in two different formats, hoping at least one of them can be used to create an AutoCAD statement with the help of supported math functions. We would like to emphasize that if you decide to use the results obtained from those formulae in a design or a construction, you should do it at your own risk.

We provide you with a graph showing the variation of the percentage relative error with the perimeter $L$ of the tear-drop. According to this graph, the accuracy of the value of $BC$ increases drastically with the increasing $L$. But, we do not know for sure whether this accuracy suffices or not for your work, even in the mentioned range of $L$ (i.e. 20 to 30 feet).

Assuming that AutoCAD allows defining and calculating a dimensionless variable before using it in a formula, we first express $BC$ in terms of $L$ and $r$ concisely as shown below. $$BC=\left(1+\frac{1}{\phi^2}\right)\left(\frac{L}{2}+r\Big\{\tan^{-1}\left(\phi\right)-\pi\Big\}\right)-\frac{r}{\phi}$$ $$\text{where}\qquad\enspace \phi = \frac{\left(L-\pi r\right)+\sqrt{\left(L-\pi r\right)^2-16r^2}}{4r}\quad$$

If that is not possible, we need to resort to the following lengthy formula to determine $BC$ in one go. $$BC = \left(1+\frac{8r^2}{\left(L-\pi r\right)^2-8r^2+\left(L-\pi r\right)\sqrt{\left(L-\pi r\right)^2-16r^2}}\right)$$ $$\qquad\qquad\enspace\mathbf{\LARGE{\times}}\left(\frac{L}{2}+r\Biggl\{\tan^{-1}\biggl(\frac{\left(L-\pi r\right)+\sqrt{\left(L-\pi r\right)^2-16r^2}}{4r} \bigg) -\pi\Biggr\} \right)$$ $$\mathbf{\LARGE{-}}\frac{4r^2}{\left(L-\pi r\right)+\sqrt{\left(L-\pi r\right)^2-16r^2}}\qquad\qquad\qquad\qquad$$

$\bf{\text{Derivation of the Formula}}$

We start by setting up the corresponding Newton-Raphson formula. Note that we use $x$ in place of $BC$ throughout our description. We define a function $f\left(x\right)$ using the $6^{\text{th}}$ equation given in OP’s problem statement. $$f\left(x\right)=x+r\left\{\pi-\tan^{-1}\left(\cfrac{x}{r}\right)\right\}-\frac{L}{2} \tag{1}$$

The first derivative of the above function is given by, $$f’\left(x\right) = \cfrac{x^2}{r^2+x^2}.\tag{2}$$

Using (1) and (2) we can set up the following Newton-Raphson formula. $$x_n = x_{n-1} -\cfrac{ f\left(x\right)}{ f’\left(x\right)}=\left(1+\cfrac{r^2}{x_{n-1}^2}\right)\Bigg(\frac{L}{2}+r\bigg\{\tan^{-1}\biggl(\cfrac{x_{n-1}}{r}\biggr)-\pi\bigg\}\Bigg)- \frac{r^2}{x_{n-1}} \tag{3}$$

We found out that this formula converges rapidly. If we could find an educated guess for $x_{\text{n-1}}$, which could deliver a very accurate value for $x_\text{n}$, when substituted in (3), we are in business.

$\bf{\text{Finding an Educated Guess}}$

Now, we need to rewrite (1) in the following format and, then, express the $\text{tan}^{-1}\text{-term}$ using one of the series expansions given below it.

$$x_\text{n-1}=\cfrac{L}{2} - r\left\{\pi-\tan^{-1}\left(\cfrac{x_\text{n-1}}{r}\right)\right\} \tag{4}$$

$$ \tan^{-1}\left(\cfrac{x_\text{n-1}}{r}\right) = \cfrac{\pi}{2} - \cfrac{r}{x_\text{n-1}} + \cfrac{r^3}{3x_\text{n-1}^3} - \cfrac{r^5}{5x_\text{n-1}^5} + \ldots\quad \text{where}\quad x_\text{n-1} \ge r \tag{5a}$$

$$ \tan^{-1}\left(\cfrac{x_\text{n-1}}{r}\right) = \cfrac{x_\text{n-1}}{r} - \cfrac{x_\text{n-1}^3}{3r^3} + \cfrac{x_\text{n-1}^5}{3r^5} + \ldots\quad \text{where}\quad x_\text{n-1} \le r \tag{5b}$$

If $L \ge \left(\dfrac{3}{2}\pi+2\right)r$, we know that $ BC\ge r$. Therefore, we use (5a) to replace $\text{tan}^{-1}\text{-term}$. Since we are looking for a guess, we retain the first two terms of (5a) and discard the rest to obtain, $$ \tan^{-1}\left(\cfrac{x_\text{n-1}}{r}\right) \approx \cfrac{\pi}{2} - \cfrac{r}{x_\text{n-1}}. $$

We plug this approximation of $\space\tan^{-1}\left(\cfrac{x_\text{n-1}}{r}\right)\space$ in (4) to get the following quadratic equation in $x_{\text{n-1}}$. $$2x_\text{n-1}^2 - \left(L-\pi r\right)x_\text{n-1}+2r^2=0$$ This equation has two positive real roots, i.e. $$x_{\text{n-1}}=\frac{\left(L-\pi r\right)\pm \sqrt{\left(L-\pi r\right)^2-16r^2}}{4}.$$

The larger of the two roots is selected as the educated guess to be inserted into (3). For the sake of convenience, we express this in the following form, where $\phi$ is a dimensionless quantity. $$\phi = \dfrac{ x_{\text{n-1}}}{r} =\frac{\left(L-\pi r\right) + \sqrt{\left(L-\pi r\right)^2-16r^2}}{4r} \tag{6}$$

Please note that (6) introduces a constrain $L\ge \left(4+\pi\right)r$ on the range of validity of $\phi$. Because of that, the range of validity of the equation given below for $BC$ also shrinks from $L \ge \left(2+\dfrac{3}{2}\pi\right)r$ to $L\ge \left(4+\pi\right)r$.

To finish the derivation, let us replace all $\dfrac{x_{\text{n-1}}}{r}\text{-terms}$ of (3) with $\phi$.

$$BC= x_n = \Bigg(1+\frac{1}{\phi^2}\Bigg)\Bigg(\frac{L}{2}+r\bigg\{ \tan^{-1}\left(\phi \right)-\pi\bigg\}\Bigg)- \frac{r}{\phi} \tag{7} $$

Although (7) is valid for the range $L\ge\left(4+\pi\right)r$, probably, the values of $BC$ calculated using (7) are accurate enough for you only in the range $ L\ge 8\pi r$. It is possible to derive equations expressing $\phi$ in terms of $L$ and $r$ for $L\lt\left(4+\pi\right)r$ as well, but they all fail to yield accurate-enough values for $BC$.


$$\small{\text{Relative Error} = \left|\frac{\text{Exact Value}\space \mathbf{\large{-}} \space\text{Computed Value}}{\text{Exact Value}}\right|}$$

The (quasi) exact values were determined numerically using Newton-Raphson method, which converges very fast for this particular scenario.

  • $\begingroup$ looks good. Is the second formula, the same as the first with the substitution made? $\endgroup$
    – Forward Ed
    Dec 9, 2021 at 20:40
  • $\begingroup$ @ForwardEd Yes, Exactly. $\endgroup$
    – YNK
    Dec 9, 2021 at 21:22
  • $\begingroup$ looking forward to seeing how you got to that equation. I have been plugging away with the formula for a circle, the line AC and AB, one slope being the negative reciprocal of the other, and the sum of the length for a half section of the "tear drop" and coming up empty. I think I was up to 5 equations and 3 unknowns, but was also thinking this may not be solvable with that methodology. $\endgroup$
    – Forward Ed
    Dec 9, 2021 at 21:50
  • $\begingroup$ @ForwardEd I just extended my answer to accommodate the derivation of equations $\endgroup$
    – YNK
    Dec 12, 2021 at 16:44
  • $\begingroup$ Thank you for the education. Newton-Raphson sounded familiar to me but I cant remember a thing about it. I am guessing it was part of my engineering numerical methods classes or one of the calculus classes. I will have to read up on that and jog my memory. $\endgroup$
    – Forward Ed
    Dec 12, 2021 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .