How to find intersection points of circle and line given only a radius and end points












0












$begingroup$


I need to find the point of intersection between a line and a circle. here is the information i have



    1. current Location.

2. destination

3. radius of a circle that the destination resides in. Let me draw it out so you can see it as well as show you what it would look like on google maps:


here is my drawing of what i need :
enter image description here



see the question marks in red. that is the point of intersection. i need that point. so (x,y) & (a,b) are given. i also have the radius for the circle which is 8.



my coordinate system looks like this:



enter image description here
what i have tried is tangent . here is what i came up with:



tan @ = (b-y)/(x-b) since that would give me the tangent between the line orange line below and then a invisible triangle i drew. but im a little lost from here and could use some help. In the end i want points (?,?) of the intersection.










share|cite|improve this question











$endgroup$












  • $begingroup$
    So you have set up the coordinate system. Do you know the equation of the circle? When you have the equation of the circle and the line, you can pair them up and solve the system numerically.
    $endgroup$
    – Matti P.
    Jan 3 at 12:09
















0












$begingroup$


I need to find the point of intersection between a line and a circle. here is the information i have



    1. current Location.

2. destination

3. radius of a circle that the destination resides in. Let me draw it out so you can see it as well as show you what it would look like on google maps:


here is my drawing of what i need :
enter image description here



see the question marks in red. that is the point of intersection. i need that point. so (x,y) & (a,b) are given. i also have the radius for the circle which is 8.



my coordinate system looks like this:



enter image description here
what i have tried is tangent . here is what i came up with:



tan @ = (b-y)/(x-b) since that would give me the tangent between the line orange line below and then a invisible triangle i drew. but im a little lost from here and could use some help. In the end i want points (?,?) of the intersection.










share|cite|improve this question











$endgroup$












  • $begingroup$
    So you have set up the coordinate system. Do you know the equation of the circle? When you have the equation of the circle and the line, you can pair them up and solve the system numerically.
    $endgroup$
    – Matti P.
    Jan 3 at 12:09














0












0








0





$begingroup$


I need to find the point of intersection between a line and a circle. here is the information i have



    1. current Location.

2. destination

3. radius of a circle that the destination resides in. Let me draw it out so you can see it as well as show you what it would look like on google maps:


here is my drawing of what i need :
enter image description here



see the question marks in red. that is the point of intersection. i need that point. so (x,y) & (a,b) are given. i also have the radius for the circle which is 8.



my coordinate system looks like this:



enter image description here
what i have tried is tangent . here is what i came up with:



tan @ = (b-y)/(x-b) since that would give me the tangent between the line orange line below and then a invisible triangle i drew. but im a little lost from here and could use some help. In the end i want points (?,?) of the intersection.










share|cite|improve this question











$endgroup$




I need to find the point of intersection between a line and a circle. here is the information i have



    1. current Location.

2. destination

3. radius of a circle that the destination resides in. Let me draw it out so you can see it as well as show you what it would look like on google maps:


here is my drawing of what i need :
enter image description here



see the question marks in red. that is the point of intersection. i need that point. so (x,y) & (a,b) are given. i also have the radius for the circle which is 8.



my coordinate system looks like this:



enter image description here
what i have tried is tangent . here is what i came up with:



tan @ = (b-y)/(x-b) since that would give me the tangent between the line orange line below and then a invisible triangle i drew. but im a little lost from here and could use some help. In the end i want points (?,?) of the intersection.







linear-algebra intersection-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 4 at 3:26







j2emanue

















asked Jan 3 at 11:58









j2emanuej2emanue

1064




1064












  • $begingroup$
    So you have set up the coordinate system. Do you know the equation of the circle? When you have the equation of the circle and the line, you can pair them up and solve the system numerically.
    $endgroup$
    – Matti P.
    Jan 3 at 12:09


















  • $begingroup$
    So you have set up the coordinate system. Do you know the equation of the circle? When you have the equation of the circle and the line, you can pair them up and solve the system numerically.
    $endgroup$
    – Matti P.
    Jan 3 at 12:09
















$begingroup$
So you have set up the coordinate system. Do you know the equation of the circle? When you have the equation of the circle and the line, you can pair them up and solve the system numerically.
$endgroup$
– Matti P.
Jan 3 at 12:09




$begingroup$
So you have set up the coordinate system. Do you know the equation of the circle? When you have the equation of the circle and the line, you can pair them up and solve the system numerically.
$endgroup$
– Matti P.
Jan 3 at 12:09










1 Answer
1






active

oldest

votes


















1












$begingroup$

So give two points $(a, b)$ and $(x, y)$ and a radius $r$, we want a point on the segment between these two points which lies a distance of $r$ away from $(a, b)$.



The line segment is parametrised by
$$
p(t) = (a, b) + t(x-a, y-b)
$$

for $t$ between $0$ and $1$. In other words, for each value of $t$ you get a point on the segment, and each point on the segment corresponds to a value of $t$. We are intereste in the point which lies $r$ away from the point $(a, b)$, which by the Pythagorean theorem means
$$
r = |p(t) - (a, b)|\
= |t(x-a, y-b)|\
= tsqrt{(x-a)^2 + (y-b)^2}\
t = frac{r}{sqrt{(x-a)^2 + (y-b)^2}}
$$

Inserting that $t$ into the formula for $p(t)$ gives you the exact coordinates of your point:
$$
pleft(frac{r}{sqrt{(x-a)^2 + (y-b)^2}}right) = (a, b) + frac{r}{sqrt{(x-a)^2 + (y-b)^2}}(x-a, y-b)
$$

Edit for example



Say $(x, y) = (11, 12)$ and $(a, b) = (2, 5)$, with $r = 8$. In that case, we get
$$
t = frac{8}{sqrt{(11-2)^2 + (12-5)^2}} = frac{8}{sqrt{81 + 49}} approx 0.702
$$

which gives us
$$
p(t) approx p(0.702) = (2, 5) + 0.702(11-2,12-5)\
approx (2, 5) + (6.315, 4.912)\
= (8.315, 9.912)
$$






share|cite|improve this answer











$endgroup$













  • $begingroup$
    your producing to me a final result of p(t). i was looking for a way to get the points. can you show me how to use your formula ? lets say i have (11,12) being x,y and (13,14) and radius of 8 how would i plug those into your formula ?
    $endgroup$
    – j2emanue
    Jan 3 at 12:18










  • $begingroup$
    @j2emanue Those points are way too close to one another, and they would both be inside the circle. But i'll make an example.
    $endgroup$
    – Arthur
    Jan 3 at 12:20











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3060488%2fhow-to-find-intersection-points-of-circle-and-line-given-only-a-radius-and-end-p%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

So give two points $(a, b)$ and $(x, y)$ and a radius $r$, we want a point on the segment between these two points which lies a distance of $r$ away from $(a, b)$.



The line segment is parametrised by
$$
p(t) = (a, b) + t(x-a, y-b)
$$

for $t$ between $0$ and $1$. In other words, for each value of $t$ you get a point on the segment, and each point on the segment corresponds to a value of $t$. We are intereste in the point which lies $r$ away from the point $(a, b)$, which by the Pythagorean theorem means
$$
r = |p(t) - (a, b)|\
= |t(x-a, y-b)|\
= tsqrt{(x-a)^2 + (y-b)^2}\
t = frac{r}{sqrt{(x-a)^2 + (y-b)^2}}
$$

Inserting that $t$ into the formula for $p(t)$ gives you the exact coordinates of your point:
$$
pleft(frac{r}{sqrt{(x-a)^2 + (y-b)^2}}right) = (a, b) + frac{r}{sqrt{(x-a)^2 + (y-b)^2}}(x-a, y-b)
$$

Edit for example



Say $(x, y) = (11, 12)$ and $(a, b) = (2, 5)$, with $r = 8$. In that case, we get
$$
t = frac{8}{sqrt{(11-2)^2 + (12-5)^2}} = frac{8}{sqrt{81 + 49}} approx 0.702
$$

which gives us
$$
p(t) approx p(0.702) = (2, 5) + 0.702(11-2,12-5)\
approx (2, 5) + (6.315, 4.912)\
= (8.315, 9.912)
$$






share|cite|improve this answer











$endgroup$













  • $begingroup$
    your producing to me a final result of p(t). i was looking for a way to get the points. can you show me how to use your formula ? lets say i have (11,12) being x,y and (13,14) and radius of 8 how would i plug those into your formula ?
    $endgroup$
    – j2emanue
    Jan 3 at 12:18










  • $begingroup$
    @j2emanue Those points are way too close to one another, and they would both be inside the circle. But i'll make an example.
    $endgroup$
    – Arthur
    Jan 3 at 12:20
















1












$begingroup$

So give two points $(a, b)$ and $(x, y)$ and a radius $r$, we want a point on the segment between these two points which lies a distance of $r$ away from $(a, b)$.



The line segment is parametrised by
$$
p(t) = (a, b) + t(x-a, y-b)
$$

for $t$ between $0$ and $1$. In other words, for each value of $t$ you get a point on the segment, and each point on the segment corresponds to a value of $t$. We are intereste in the point which lies $r$ away from the point $(a, b)$, which by the Pythagorean theorem means
$$
r = |p(t) - (a, b)|\
= |t(x-a, y-b)|\
= tsqrt{(x-a)^2 + (y-b)^2}\
t = frac{r}{sqrt{(x-a)^2 + (y-b)^2}}
$$

Inserting that $t$ into the formula for $p(t)$ gives you the exact coordinates of your point:
$$
pleft(frac{r}{sqrt{(x-a)^2 + (y-b)^2}}right) = (a, b) + frac{r}{sqrt{(x-a)^2 + (y-b)^2}}(x-a, y-b)
$$

Edit for example



Say $(x, y) = (11, 12)$ and $(a, b) = (2, 5)$, with $r = 8$. In that case, we get
$$
t = frac{8}{sqrt{(11-2)^2 + (12-5)^2}} = frac{8}{sqrt{81 + 49}} approx 0.702
$$

which gives us
$$
p(t) approx p(0.702) = (2, 5) + 0.702(11-2,12-5)\
approx (2, 5) + (6.315, 4.912)\
= (8.315, 9.912)
$$






share|cite|improve this answer











$endgroup$













  • $begingroup$
    your producing to me a final result of p(t). i was looking for a way to get the points. can you show me how to use your formula ? lets say i have (11,12) being x,y and (13,14) and radius of 8 how would i plug those into your formula ?
    $endgroup$
    – j2emanue
    Jan 3 at 12:18










  • $begingroup$
    @j2emanue Those points are way too close to one another, and they would both be inside the circle. But i'll make an example.
    $endgroup$
    – Arthur
    Jan 3 at 12:20














1












1








1





$begingroup$

So give two points $(a, b)$ and $(x, y)$ and a radius $r$, we want a point on the segment between these two points which lies a distance of $r$ away from $(a, b)$.



The line segment is parametrised by
$$
p(t) = (a, b) + t(x-a, y-b)
$$

for $t$ between $0$ and $1$. In other words, for each value of $t$ you get a point on the segment, and each point on the segment corresponds to a value of $t$. We are intereste in the point which lies $r$ away from the point $(a, b)$, which by the Pythagorean theorem means
$$
r = |p(t) - (a, b)|\
= |t(x-a, y-b)|\
= tsqrt{(x-a)^2 + (y-b)^2}\
t = frac{r}{sqrt{(x-a)^2 + (y-b)^2}}
$$

Inserting that $t$ into the formula for $p(t)$ gives you the exact coordinates of your point:
$$
pleft(frac{r}{sqrt{(x-a)^2 + (y-b)^2}}right) = (a, b) + frac{r}{sqrt{(x-a)^2 + (y-b)^2}}(x-a, y-b)
$$

Edit for example



Say $(x, y) = (11, 12)$ and $(a, b) = (2, 5)$, with $r = 8$. In that case, we get
$$
t = frac{8}{sqrt{(11-2)^2 + (12-5)^2}} = frac{8}{sqrt{81 + 49}} approx 0.702
$$

which gives us
$$
p(t) approx p(0.702) = (2, 5) + 0.702(11-2,12-5)\
approx (2, 5) + (6.315, 4.912)\
= (8.315, 9.912)
$$






share|cite|improve this answer











$endgroup$



So give two points $(a, b)$ and $(x, y)$ and a radius $r$, we want a point on the segment between these two points which lies a distance of $r$ away from $(a, b)$.



The line segment is parametrised by
$$
p(t) = (a, b) + t(x-a, y-b)
$$

for $t$ between $0$ and $1$. In other words, for each value of $t$ you get a point on the segment, and each point on the segment corresponds to a value of $t$. We are intereste in the point which lies $r$ away from the point $(a, b)$, which by the Pythagorean theorem means
$$
r = |p(t) - (a, b)|\
= |t(x-a, y-b)|\
= tsqrt{(x-a)^2 + (y-b)^2}\
t = frac{r}{sqrt{(x-a)^2 + (y-b)^2}}
$$

Inserting that $t$ into the formula for $p(t)$ gives you the exact coordinates of your point:
$$
pleft(frac{r}{sqrt{(x-a)^2 + (y-b)^2}}right) = (a, b) + frac{r}{sqrt{(x-a)^2 + (y-b)^2}}(x-a, y-b)
$$

Edit for example



Say $(x, y) = (11, 12)$ and $(a, b) = (2, 5)$, with $r = 8$. In that case, we get
$$
t = frac{8}{sqrt{(11-2)^2 + (12-5)^2}} = frac{8}{sqrt{81 + 49}} approx 0.702
$$

which gives us
$$
p(t) approx p(0.702) = (2, 5) + 0.702(11-2,12-5)\
approx (2, 5) + (6.315, 4.912)\
= (8.315, 9.912)
$$







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Jan 3 at 12:25

























answered Jan 3 at 12:10









ArthurArthur

113k7113195




113k7113195












  • $begingroup$
    your producing to me a final result of p(t). i was looking for a way to get the points. can you show me how to use your formula ? lets say i have (11,12) being x,y and (13,14) and radius of 8 how would i plug those into your formula ?
    $endgroup$
    – j2emanue
    Jan 3 at 12:18










  • $begingroup$
    @j2emanue Those points are way too close to one another, and they would both be inside the circle. But i'll make an example.
    $endgroup$
    – Arthur
    Jan 3 at 12:20


















  • $begingroup$
    your producing to me a final result of p(t). i was looking for a way to get the points. can you show me how to use your formula ? lets say i have (11,12) being x,y and (13,14) and radius of 8 how would i plug those into your formula ?
    $endgroup$
    – j2emanue
    Jan 3 at 12:18










  • $begingroup$
    @j2emanue Those points are way too close to one another, and they would both be inside the circle. But i'll make an example.
    $endgroup$
    – Arthur
    Jan 3 at 12:20
















$begingroup$
your producing to me a final result of p(t). i was looking for a way to get the points. can you show me how to use your formula ? lets say i have (11,12) being x,y and (13,14) and radius of 8 how would i plug those into your formula ?
$endgroup$
– j2emanue
Jan 3 at 12:18




$begingroup$
your producing to me a final result of p(t). i was looking for a way to get the points. can you show me how to use your formula ? lets say i have (11,12) being x,y and (13,14) and radius of 8 how would i plug those into your formula ?
$endgroup$
– j2emanue
Jan 3 at 12:18












$begingroup$
@j2emanue Those points are way too close to one another, and they would both be inside the circle. But i'll make an example.
$endgroup$
– Arthur
Jan 3 at 12:20




$begingroup$
@j2emanue Those points are way too close to one another, and they would both be inside the circle. But i'll make an example.
$endgroup$
– Arthur
Jan 3 at 12:20


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3060488%2fhow-to-find-intersection-points-of-circle-and-line-given-only-a-radius-and-end-p%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

File:DeusFollowingSea.jpg