Relationship of two circles in a triangle

dnaines

New member
Joined
Oct 30, 2019
Messages
9
Math gurus, I have a puzzler! Given the diagram below I need to determine the angle of A. The diameter of both circles are known (4 and 8) however the distance between the centers of the circles is not known. Both B and C are perpendicular to the dotted blue line and the distance between B and C are known. The distance between AB == BC due to the circle relationship being 1:2.

A little more to the story, this is to come up with a method to calibrate a laser measurement system. The dotted blue line is the axis of travel while the two circles are calibration disks. The green line adjacent to the blue is the laser itself (at an unknown angle) .The thought being the angle of A can be determined with the calibration disks and used as a static value to measure unknown disks.

I did try to do this using a single disk, the 4, however the error at 8 was too much (was just 0.02 however in this case it is too much). Thought is to use two disks at the min and max of the range to get a more accurate value.

Circles.JPG
 
How does the second circle/disk help? It's exactly where it's supposed to be. We can add 12, 16, etc, how would they help?
 
Actually let me back up a little bit. I need to code the calculation, not the actual result. How did you come up with 17.9, please!

The precision is sort of hard to determine. Mathematically everything is spot on, in actual practice, not so much.
 
How does the second circle/disk help? It's exactly where it's supposed to be. We can add 12, 16, etc, how would they help?

I picked the second disk to be at the max OD range while the first disk is at the min range of objects that would be measured in the future. Thought being if the angle of A is derived from the two rather than one, anything that falls between would be more accurate. Keep in mind this is a laser system measuring the disks, so while the math could check out it doesn't seem to be 100% repeatable in practice.
 
Also, another way I can think to go about it is get the angle from each disk size individually, then average the two values. Not sure that'll get exactly what I want though!
 
As I understand it, you can measure only d in my picture, and you know the radii r and R (2 and 4 respectively). So you want to express angle [MATH]\alpha[/MATH] in terms of r, R, and d.

From triangle DEH, [MATH]tan(\alpha) = \frac{R-r}{L}[/MATH]. From triangle FGI, [MATH]cos(\alpha) = \frac{D}{L}[/MATH].

Eliminate L from these equations and solve for [MATH]\alpha[/MATH]. I'll leave the rest to you. (I get a non-trivial formula, which gives the correct angle according to my construction.

FMH118819.png
 
As I understand it, you can measure only d in my picture, and you know the radii r and R (2 and 4 respectively). So you want to express angle [MATH]\alpha[/MATH] in terms of r, R, and d.

From triangle DEH, [MATH]tan(\alpha) = \frac{R-r}{L}[/MATH]. From triangle FGI, [MATH]cos(\alpha) = \frac{D}{L}[/MATH].

Eliminate L from these equations and solve for [MATH]\alpha[/MATH]. I'll leave the rest to you. (I get a non-trivial formula, which gives the correct angle according to my construction.

View attachment 14395

Yes!! This is what I was looking for. Now, I’ve Been mulling over the equations for the evening and unfortunately didn’t make it far. Having trouble getting that [MATH]\alpha[/MATH] out of there.
[MATH]\frac{cos(\alpha)}{tan(\alpha)} =\frac{d}{R-r}[/MATH]
 
Rewrite [MATH]\tan(\alpha)[/MATH] as [MATH]\frac{\sin(\alpha)}{\cos(\alpha)}[/MATH]; then use a Pythagorean identity and a little more manipulation to make a quadratic in [MATH]\sin(\alpha)[/MATH].
 
Rewrite [MATH]\tan(\alpha)[/MATH] as [MATH]\frac{\sin(\alpha)}{\cos(\alpha)}[/MATH]; then use a Pythagorean identity and a little more manipulation to make a quadratic in [MATH]\sin(\alpha)[/MATH].

This turned in to more of a collaboration, but I think we got it!

End result is [MATH]\sin(\alpha) = \frac{d}{R-r} - \sqrt\frac{-\frac{d}{R-r}^2 + 4}{-2}[/MATH]

Bare with my scribbles and skipping.. continuing from [MATH]\frac{\cos(\alpha)}{\tan(\alpha)} = \frac{d}{R-r}[/MATH]
As you said, [MATH]\frac{\cos(\alpha)}{\frac{\sin(\alpha)}{\cos(\alpha)}} = \frac{d}{R-r}[/MATH] rewritten to [MATH]\cos^2(\alpha) = \frac{d}{R-r}sin(\alpha)[/MATH]
[MATH]\cos^2(\alpha) = 1- \sin^2(\alpha)[/MATH] ....so.... [MATH]1- \sin^2(\alpha) = \frac{d}{R-r}sin(\alpha)[/MATH]
Rewritten to [MATH]1- \sin^2(\alpha) - \frac{d}{R-r}sin(\alpha) = 0[/MATH]
Then finally substitute the values in to the quadratic equation to get the above.
Will end up running the calculation as [MATH]\alpha = \sin^-1( \frac{d}{R-r} - \sqrt\frac{-\frac{d}{R-r}^2 + 4}{-2})[/MATH]
Thank you for the help!
 
You made some errors, mostly with signs, in your formula (unless I misread something). To avoid those, I'd simplify the quadratic equation before solving:

[MATH]\sin^2(\alpha) + \frac{d}{R-r}sin(\alpha) - 1= 0[/MATH]​

I also made an intermediate variable,

[MATH]c = \frac{d}{R-r}[/MATH]​

so the equation becomes

[MATH]s^2 + cs - 1= 0[/MATH]​

and the solution is

[MATH]\sin(\alpha) = s = \frac{-c + \sqrt{c^2 + 4}}{2} = \frac{-\frac{d}{R-r} + \sqrt{\left(\frac{d}{R-r}\right)^2 + 4}}{2}[/MATH]​

This could be further simplified to eliminate fractions inside the radical.

Have you checked your result against the given numbers?
 
You made some errors, mostly with signs, in your formula (unless I misread something). To avoid those, I'd simplify the quadratic equation before solving:

[MATH]\sin^2(\alpha) + \frac{d}{R-r}sin(\alpha) - 1= 0[/MATH]​

I also made an intermediate variable,

[MATH]c = \frac{d}{R-r}[/MATH]​

so the equation becomes

[MATH]s^2 + cs - 1= 0[/MATH]​

and the solution is

[MATH]\sin(\alpha) = s = \frac{-c + \sqrt{c^2 + 4}}{2} = \frac{-\frac{d}{R-r} + \sqrt{\left(\frac{d}{R-r}\right)^2 + 4}}{2}[/MATH]​

This could be further simplified to eliminate fractions inside the radical.

Have you checked your result against the given numbers?

Hm, my equations came out looking wonky on here too. Sorry, I have not used LaTeX before, sort of winging it. I was running it similar to what you have written now, instead of having the 2 in the squareroot. [MATH]\frac{-\frac{d}{R-r} - \sqrt{\left(\frac{d}{R-r}\right)^2 + 4}}{2}[/MATH]
I believe there are actually two answers? so really [MATH]\frac{-\frac{d}{R-r} \pm \sqrt{\left(\frac{d}{R-r}\right)^2 + 4}}{2}[/MATH]I'm my case the - worked so I went with that. For my purpose, ending here is find though I do agree that it could be simplified.
In any event, I was able to run the numbers through and it works.

For grins, here's the way I've got it in my CNC: angle = ASIN(-(((dist/(Rad2-Rad1))-SQRT(((POT(dist/(Rad2-Rad1))+4))))*0.5))
Some odd multiplication and negatives in there due to how the system handles division and order of operations.
 
Still wondering...

ah sorry! so you have to imagine I have some metal disks that I am using a laser to determine the diameter of. My laser is not perpendicular to the axis of travel of said disks so the angle of the laser vs the axis of travel must be known ahead of time (along with the position at which the laser crosses the center of the disk, but I have that as a static value and can also calculate it using the two disk method as well).
My problem ended up being when I used a single known disk to calculate the angle, it was not as accurate at a larger size (and vice versa). Mind you it was only 0.02 different at a 1.5 size difference, but I need it down at 0.001. So the though is I'll pick two disks that are at the min and max range of what I will be measuring and get the angle from them. Anything between should then be linear. Really any two disks would work as long as one is bigger than the other. Mathematically everything does come out even, but in practice due to small errors in the system, the angle is not quite the calculated.

I did plug all this in to a CAD program and it spit out the angle, but if the laser ever gets bumped or something else changes, it would be better to have an equation to just run and have it set back up without needing to take any manual measurements.
 
Hm, my equations came out looking wonky on here too. Sorry, I have not used LaTeX before, sort of winging it. I was running it similar to what you have written now, instead of having the 2 in the squareroot. [MATH]\frac{-\frac{d}{R-r} - \sqrt{\left(\frac{d}{R-r}\right)^2 + 4}}{2}[/MATH]
I believe there are actually two answers? so really [MATH]\frac{-\frac{d}{R-r} \pm \sqrt{\left(\frac{d}{R-r}\right)^2 + 4}}{2}[/MATH]I'm my case the - worked so I went with that. For my purpose, ending here is find though I do agree that it could be simplified.
In any event, I was able to run the numbers through and it works.

For grins, here's the way I've got it in my CNC: angle = ASIN(-(((dist/(Rad2-Rad1))-SQRT(((POT(dist/(Rad2-Rad1))+4))))*0.5))
Some odd multiplication and negatives in there due to how the system handles division and order of operations.
Sounds good. I figured at least some of the error was likely due to your LaTeX. And the simplification I'd do would only make it look a little prettier to a human -- it would not change the number of operations significantly, or make it easier to enter in your format.

The second answer would be negative, so you can ignore it. I'm not sure what configuration it represents.

I take it POT means Power Of Two in your world.
 
Sounds good. I figured at least some of the error was likely due to your LaTeX. And the simplification I'd do would only make it look a little prettier to a human -- it would not change the number of operations significantly, or make it easier to enter in your format.

The second answer would be negative, so you can ignore it. I'm not sure what configuration it represents.

I take it POT means Power Of Two in your world.

Indeed it does! For finishing context, to measure an unknown radius I am using [MATH]r=\frac{d*\tan(a)}{sin(90-a)}[/MATH] where a is the previously calculated A angle and d is the measured distance AB in the previous diagram. To get the static position of A I am using the distance from center of the known smaller circle, AD, as [MATH]AD=\frac{r}{\sin(a)}[/MATH] than adding it to my encoder position. In turn, the encoder position of the unknown is subtracted from the static A position to get AB (d in the above formula).
 
Top