Azzera filtri
Azzera filtri

How to find the equation of a tangent line to a circle ( known radius) from a known point? And How to find the intersection point on the circle?

3 visualizzazioni (ultimi 30 giorni)
How to find the equation of a tangent line to a circle ( known radius) from a known point? And How to find the intersection point on the circle?

Risposta accettata

Image Analyst
Image Analyst il 28 Nov 2019
Modificato: Image Analyst il 29 Nov 2019
This is not a MATLAB question - it's just analytical geometry formulas and algebra. Just draw it out and make sure you see the right angle between the center, the point off the circle, and the point on the circle. Then use the Pythagorean theorem.
[EDIT]
OK some more hints:
Let's say R is the radius, and (xr, yr) is on the circle, and (xc, yc) is the center of the circle, and (xp, yp) is the point away from and off the circle. So by the Pythagorean theorem
length1 = sqrt((xp-xr)^2 + (yp-yr)^2) % Length of side #1
length2 = sqrt((xp-xc)^2 + (yp-yc)^2) % Length of side #2
R^2 + length1^2 = length2^2 % The right triangle.
Plug in for length1 and length 2 :
R^2 + (xp-xr)^2 + (yp-yr)^2 = (xp-xc)^2 + (yp-yc)^2 % The right triangle.
Multiply out and cancel and combine terms and you'll be further along.
  2 Commenti
Zarak kh
Zarak kh il 29 Nov 2019
Hello and thanks for your answer,
As you said I used mathematical and geometry formulation for my question as below:
I calculate the slope of the tangent line according to the fact that the slop of the tangent line is equal to derivation of the circle at that point. Then I have a point off the circle and the slope and I need to find the point on the circle. I also have the equation of the circle. so I have 2 equations and two unknown variables which are (xr, yr) and by solving them I get (xr, yr).
Regarding your answer as you wrote in the last line, you provide one equation with two unkown parameters which are (xr, yr). Should I add circle equation to your last equation?

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Computational Geometry in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by