Find Tangent Points of Circle and Two Lines in First Quadrant
up vote
0
down vote
favorite
I need to define explicit expressions to find the points (x1,y1) and (x2,y2), which are the two tangent points of a circle with radius r (known) and two lines (equations known). The center of the circle (x0,y0) is not know and not needed. See picture below.
see sketch here
In my case, I have the following conditions:
- problem in first quadrant: x>0, y>0
- line y=m1*x+b1 with m1<=0, b1>=0
- line y=m2*x+b2 with m2 < m1, b2>b1
- circle centre above y=m1*x+b1, so y0>y1
- circle centre at r.h.s. of y=m2*x+b2, so x0>x2
- circle tangent to line y=m1*x+b1, so (y1-y0)/(x1-x0)=-1/m1
- circle tangent to line y=m2*x+b2, so (y2-y0)/(x2-x0)=-1/m2
I computed the following in SageMath:
x1, y1, x2, y2 = var('x1, y1, x2, y2') # tangent points
m1, b1, m2, b2 = var('m1, b1, m2, b2') # lines' eqn
x0, y0, r = var('x0, y0, r') # cirsle's eqn
eq1 = (x1 - x0)^2 + (y1 - y0)^2 - r^2 == 0
eq2 = (x2 - x0)^2 + (y2 - y0)^2 - r^2 == 0
eq3 = y1 - m1*x1 - b1 == 0
eq4 = y2 - m2*x2 - b2 == 0
eq5 = (y1-y0)/(x1-x0) == -1/m1
eq6 = (y2-y0)/(x2-x0) == -1/m2
# unknown: x0,y0,x1,y1,x2,y2
# known: m1,b1,m2,b2,r
solve([eq1,eq2,eq3,eq4,eq5,eq6,
x1>0,y1>0,x2>0,y2>0,
m1<=0,b1>=0,m2<m1,b2>b1,
x0>x2,y0>y1,r>0],x0,y0,x1,y1,x2,y2)
Why is this not enough to define the problem?
geometry analytic-geometry computational-mathematics sagemath
New contributor
add a comment |
up vote
0
down vote
favorite
I need to define explicit expressions to find the points (x1,y1) and (x2,y2), which are the two tangent points of a circle with radius r (known) and two lines (equations known). The center of the circle (x0,y0) is not know and not needed. See picture below.
see sketch here
In my case, I have the following conditions:
- problem in first quadrant: x>0, y>0
- line y=m1*x+b1 with m1<=0, b1>=0
- line y=m2*x+b2 with m2 < m1, b2>b1
- circle centre above y=m1*x+b1, so y0>y1
- circle centre at r.h.s. of y=m2*x+b2, so x0>x2
- circle tangent to line y=m1*x+b1, so (y1-y0)/(x1-x0)=-1/m1
- circle tangent to line y=m2*x+b2, so (y2-y0)/(x2-x0)=-1/m2
I computed the following in SageMath:
x1, y1, x2, y2 = var('x1, y1, x2, y2') # tangent points
m1, b1, m2, b2 = var('m1, b1, m2, b2') # lines' eqn
x0, y0, r = var('x0, y0, r') # cirsle's eqn
eq1 = (x1 - x0)^2 + (y1 - y0)^2 - r^2 == 0
eq2 = (x2 - x0)^2 + (y2 - y0)^2 - r^2 == 0
eq3 = y1 - m1*x1 - b1 == 0
eq4 = y2 - m2*x2 - b2 == 0
eq5 = (y1-y0)/(x1-x0) == -1/m1
eq6 = (y2-y0)/(x2-x0) == -1/m2
# unknown: x0,y0,x1,y1,x2,y2
# known: m1,b1,m2,b2,r
solve([eq1,eq2,eq3,eq4,eq5,eq6,
x1>0,y1>0,x2>0,y2>0,
m1<=0,b1>=0,m2<m1,b2>b1,
x0>x2,y0>y1,r>0],x0,y0,x1,y1,x2,y2)
Why is this not enough to define the problem?
geometry analytic-geometry computational-mathematics sagemath
New contributor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I need to define explicit expressions to find the points (x1,y1) and (x2,y2), which are the two tangent points of a circle with radius r (known) and two lines (equations known). The center of the circle (x0,y0) is not know and not needed. See picture below.
see sketch here
In my case, I have the following conditions:
- problem in first quadrant: x>0, y>0
- line y=m1*x+b1 with m1<=0, b1>=0
- line y=m2*x+b2 with m2 < m1, b2>b1
- circle centre above y=m1*x+b1, so y0>y1
- circle centre at r.h.s. of y=m2*x+b2, so x0>x2
- circle tangent to line y=m1*x+b1, so (y1-y0)/(x1-x0)=-1/m1
- circle tangent to line y=m2*x+b2, so (y2-y0)/(x2-x0)=-1/m2
I computed the following in SageMath:
x1, y1, x2, y2 = var('x1, y1, x2, y2') # tangent points
m1, b1, m2, b2 = var('m1, b1, m2, b2') # lines' eqn
x0, y0, r = var('x0, y0, r') # cirsle's eqn
eq1 = (x1 - x0)^2 + (y1 - y0)^2 - r^2 == 0
eq2 = (x2 - x0)^2 + (y2 - y0)^2 - r^2 == 0
eq3 = y1 - m1*x1 - b1 == 0
eq4 = y2 - m2*x2 - b2 == 0
eq5 = (y1-y0)/(x1-x0) == -1/m1
eq6 = (y2-y0)/(x2-x0) == -1/m2
# unknown: x0,y0,x1,y1,x2,y2
# known: m1,b1,m2,b2,r
solve([eq1,eq2,eq3,eq4,eq5,eq6,
x1>0,y1>0,x2>0,y2>0,
m1<=0,b1>=0,m2<m1,b2>b1,
x0>x2,y0>y1,r>0],x0,y0,x1,y1,x2,y2)
Why is this not enough to define the problem?
geometry analytic-geometry computational-mathematics sagemath
New contributor
I need to define explicit expressions to find the points (x1,y1) and (x2,y2), which are the two tangent points of a circle with radius r (known) and two lines (equations known). The center of the circle (x0,y0) is not know and not needed. See picture below.
see sketch here
In my case, I have the following conditions:
- problem in first quadrant: x>0, y>0
- line y=m1*x+b1 with m1<=0, b1>=0
- line y=m2*x+b2 with m2 < m1, b2>b1
- circle centre above y=m1*x+b1, so y0>y1
- circle centre at r.h.s. of y=m2*x+b2, so x0>x2
- circle tangent to line y=m1*x+b1, so (y1-y0)/(x1-x0)=-1/m1
- circle tangent to line y=m2*x+b2, so (y2-y0)/(x2-x0)=-1/m2
I computed the following in SageMath:
x1, y1, x2, y2 = var('x1, y1, x2, y2') # tangent points
m1, b1, m2, b2 = var('m1, b1, m2, b2') # lines' eqn
x0, y0, r = var('x0, y0, r') # cirsle's eqn
eq1 = (x1 - x0)^2 + (y1 - y0)^2 - r^2 == 0
eq2 = (x2 - x0)^2 + (y2 - y0)^2 - r^2 == 0
eq3 = y1 - m1*x1 - b1 == 0
eq4 = y2 - m2*x2 - b2 == 0
eq5 = (y1-y0)/(x1-x0) == -1/m1
eq6 = (y2-y0)/(x2-x0) == -1/m2
# unknown: x0,y0,x1,y1,x2,y2
# known: m1,b1,m2,b2,r
solve([eq1,eq2,eq3,eq4,eq5,eq6,
x1>0,y1>0,x2>0,y2>0,
m1<=0,b1>=0,m2<m1,b2>b1,
x0>x2,y0>y1,r>0],x0,y0,x1,y1,x2,y2)
Why is this not enough to define the problem?
geometry analytic-geometry computational-mathematics sagemath
geometry analytic-geometry computational-mathematics sagemath
New contributor
New contributor
New contributor
asked Nov 17 at 18:53
J. Serra
1
1
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Without knowing m1, b1, m2, b2, r
you cannot tell whether you even have solutions in the first quadrant. So in a way I believe your setup is too constrained. The fact that Sage by default assumes that numbers can be complex makes things even harder.
Honestly I'd go about this a different way. Since the center of the circle has distance $r$ from your first line, it has to be on a line parallel to your first line but with a distance of $r$ between them. The same holds for the second line. So the center of the circle is essentially at the point where two parallels intersect.
With this approach, you can build all the magic around which of the solutions you want into the choice of which of the two possible parallels you want for each of your lines. Then it's a simple intersection of lines after that.
Hi @MvG, I understand there are simpler approaches but I'd like to understand why this is not working as I thought this would be moderately straightforward. I think my constraints ensure we are in the first quadrant. I'd like to know which conditions render the problem to constrained.
– J. Serra
Nov 18 at 0:02
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Without knowing m1, b1, m2, b2, r
you cannot tell whether you even have solutions in the first quadrant. So in a way I believe your setup is too constrained. The fact that Sage by default assumes that numbers can be complex makes things even harder.
Honestly I'd go about this a different way. Since the center of the circle has distance $r$ from your first line, it has to be on a line parallel to your first line but with a distance of $r$ between them. The same holds for the second line. So the center of the circle is essentially at the point where two parallels intersect.
With this approach, you can build all the magic around which of the solutions you want into the choice of which of the two possible parallels you want for each of your lines. Then it's a simple intersection of lines after that.
Hi @MvG, I understand there are simpler approaches but I'd like to understand why this is not working as I thought this would be moderately straightforward. I think my constraints ensure we are in the first quadrant. I'd like to know which conditions render the problem to constrained.
– J. Serra
Nov 18 at 0:02
add a comment |
up vote
1
down vote
Without knowing m1, b1, m2, b2, r
you cannot tell whether you even have solutions in the first quadrant. So in a way I believe your setup is too constrained. The fact that Sage by default assumes that numbers can be complex makes things even harder.
Honestly I'd go about this a different way. Since the center of the circle has distance $r$ from your first line, it has to be on a line parallel to your first line but with a distance of $r$ between them. The same holds for the second line. So the center of the circle is essentially at the point where two parallels intersect.
With this approach, you can build all the magic around which of the solutions you want into the choice of which of the two possible parallels you want for each of your lines. Then it's a simple intersection of lines after that.
Hi @MvG, I understand there are simpler approaches but I'd like to understand why this is not working as I thought this would be moderately straightforward. I think my constraints ensure we are in the first quadrant. I'd like to know which conditions render the problem to constrained.
– J. Serra
Nov 18 at 0:02
add a comment |
up vote
1
down vote
up vote
1
down vote
Without knowing m1, b1, m2, b2, r
you cannot tell whether you even have solutions in the first quadrant. So in a way I believe your setup is too constrained. The fact that Sage by default assumes that numbers can be complex makes things even harder.
Honestly I'd go about this a different way. Since the center of the circle has distance $r$ from your first line, it has to be on a line parallel to your first line but with a distance of $r$ between them. The same holds for the second line. So the center of the circle is essentially at the point where two parallels intersect.
With this approach, you can build all the magic around which of the solutions you want into the choice of which of the two possible parallels you want for each of your lines. Then it's a simple intersection of lines after that.
Without knowing m1, b1, m2, b2, r
you cannot tell whether you even have solutions in the first quadrant. So in a way I believe your setup is too constrained. The fact that Sage by default assumes that numbers can be complex makes things even harder.
Honestly I'd go about this a different way. Since the center of the circle has distance $r$ from your first line, it has to be on a line parallel to your first line but with a distance of $r$ between them. The same holds for the second line. So the center of the circle is essentially at the point where two parallels intersect.
With this approach, you can build all the magic around which of the solutions you want into the choice of which of the two possible parallels you want for each of your lines. Then it's a simple intersection of lines after that.
answered Nov 17 at 22:03
MvG
30.4k44799
30.4k44799
Hi @MvG, I understand there are simpler approaches but I'd like to understand why this is not working as I thought this would be moderately straightforward. I think my constraints ensure we are in the first quadrant. I'd like to know which conditions render the problem to constrained.
– J. Serra
Nov 18 at 0:02
add a comment |
Hi @MvG, I understand there are simpler approaches but I'd like to understand why this is not working as I thought this would be moderately straightforward. I think my constraints ensure we are in the first quadrant. I'd like to know which conditions render the problem to constrained.
– J. Serra
Nov 18 at 0:02
Hi @MvG, I understand there are simpler approaches but I'd like to understand why this is not working as I thought this would be moderately straightforward. I think my constraints ensure we are in the first quadrant. I'd like to know which conditions render the problem to constrained.
– J. Serra
Nov 18 at 0:02
Hi @MvG, I understand there are simpler approaches but I'd like to understand why this is not working as I thought this would be moderately straightforward. I think my constraints ensure we are in the first quadrant. I'd like to know which conditions render the problem to constrained.
– J. Serra
Nov 18 at 0:02
add a comment |
J. Serra is a new contributor. Be nice, and check out our Code of Conduct.
J. Serra is a new contributor. Be nice, and check out our Code of Conduct.
J. Serra is a new contributor. Be nice, and check out our Code of Conduct.
J. Serra is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3002687%2ffind-tangent-points-of-circle-and-two-lines-in-first-quadrant%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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