Find the radius of a circle tangent to a line and another circle

17 visualizaciones (últimos 30 días)
AJ
AJ el 13 de Jun. de 2017
Editada: John D'Errico el 14 de Jun. de 2017
Given a circle of radius 'r'. A line segment AB of length 'd' is drawn tangent to this circle such that B is the point of tangency between them. My goal is to draw a circle (that passes through point A) tangent to both line segment AB and the circle of radius r. F is the point of tangency between the circles. So for a given value of r and d, I need R and theta. Please help.

Respuestas (2)

John D'Errico
John D'Errico el 14 de Jun. de 2017
Editada: John D'Errico el 14 de Jun. de 2017
Sorry, but not MATLAB. Pretty basic analytic geometry. Had image Analyst not answered it, I'd never have posted an answer. And, really, this IS homework. Even if you chose to solve the problem yourself, then you should try to solve it yourself, instead of asking for someone else to do your work. You will never learn unless you make an effort.
You have circle 1, with center at (0,r1).
Circle 2 has radius r2. The center of circle 2 must lie at a distance r1+r2 from the center of circle 1. Circle 2 lies at the point (x,r2).
The Euclidean distance from point (0,r1) and (x,r2) is r1+r2. So we have the one equation
(x-0)^2 + (r2-r1)^2 = (r1+r2)^2
Solve it using pencil and paper. Why bother using MATLAB? If r2 and x are known, then r1 is trivial to extract from that equation.
Theta is also trivial to compute. You have a right triangle that connects the two centers. The point of tangency MUST lie along that line (despite your inaccurate drawing, that must be true. Basic fact about tangent circles there.) What are the sides of the triangle?
They are: x and r1-r2. The hypotenuse is r1+r2.
Can you compute an angle given the sides of a right triangle? This is basic trigonometry. Not MATLAB. While you can do the computations in MATLAB, you could as easily have done the computations using pencil, paper, and a slide rule.
  3 comentarios
AJ
AJ el 14 de Jun. de 2017
Editada: AJ el 14 de Jun. de 2017
How do you know I haven't made an effort, John? You didn't have to answer it if you feel it is beneath you. Having said that, thanks for the response.
I always encourage people to ask me questions no matter how silly it is. If I can help, I help. I don't automatically assume that they made no effort. I've had teachers like this before and I despised them. Maybe, just maybe, not everyone has the brain matter to grasp it all at once.
John D'Errico
John D'Errico el 14 de Jun. de 2017
Editada: John D'Errico el 14 de Jun. de 2017
My point was that these things are not MATLAB problems. There is no real need for MATLAB to be involved until the very end, computing a simple result. If you post this as a MATLAB problem, then you are asking someone to do all of your thinking for you.
This is a problem of visualizing the geometry, and understanding how that translates into mathematics. Then you write out the governing equation. That is pure mathematics. That is a characteristic of all such word problems, the art of applied mathematics. At some point, the question morphs into how to build a mathematical model of some system.
Until you derive that governing equation though, MATLAB has no impact. MATLAB does not understand geometry. And once you do write down the governing equation, then you should find that you never really needed to go beyond pencil and paper, because if you expand the squares in that equation, you will find that it gets even more trivial. Yes, I suppose you could have used the symbolic toolbox to do that part.
d^2 = 4*r*R
If you ask for someone to solve the problem you have posed, then you ask for them to do the part that comes before MATLAB can ever be involved. And that is why I treated your question so poorly.

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 14 de Jun. de 2017
Editada: Image Analyst el 14 de Jun. de 2017
Sounds like homework. I don't see a question there. Looks like just a puzzle in trig.
Anyway, draw a line from A to the center of the small circle, and call that C. So C^2 = r^2+d^2. And you know from the law of cosines C^2 = R^2 + (R+r)^2 - 2 * R * (R+r) * cos(theta). So then look up various MATLAB functions like fzero(), roots(), etc. and see if you can figure out the rest. Good luck.
By the way, for a given d and R there is not just one unique solution. For example for that diagram you have, you have the one solution shown, but if you shrink R, the big circle will move right into the corner, and you'll have a new solution with a new larger theta also. So there are lots of big circles that can fit into the corner and be tangent to both the flat horizontal line and some point on the little circle for a given d and r.
  2 comentarios
AJ
AJ el 14 de Jun. de 2017
Editada: AJ el 14 de Jun. de 2017
It might sound like a homework problem, but it isn't. I play around with geometry concepts because I find it interesting. I drew the whole thing in powerpoint just to illustrate my problem.
I'm pretty sure for a given value of d and r, there is a unique solution for R and theta. In both diagrams, value of r is kept the same. As d decreases, R decreases and theta increases. Note that each object is tangent to the other 2 all the time. So for a specific value of d, there can be only one value for R and theta.
Image Analyst
Image Analyst el 14 de Jun. de 2017
Yeah, you're right about the unique solution - not sure what I was thinking at the time.

Iniciar sesión para comentar.

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by