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:




  1. problem in first quadrant: x>0, y>0

  2. line y=m1*x+b1 with m1<=0, b1>=0

  3. line y=m2*x+b2 with m2 < m1, b2>b1

  4. circle centre above y=m1*x+b1, so y0>y1

  5. circle centre at r.h.s. of y=m2*x+b2, so x0>x2

  6. circle tangent to line y=m1*x+b1, so (y1-y0)/(x1-x0)=-1/m1

  7. 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?










share|cite|improve this question


























    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:




    1. problem in first quadrant: x>0, y>0

    2. line y=m1*x+b1 with m1<=0, b1>=0

    3. line y=m2*x+b2 with m2 < m1, b2>b1

    4. circle centre above y=m1*x+b1, so y0>y1

    5. circle centre at r.h.s. of y=m2*x+b2, so x0>x2

    6. circle tangent to line y=m1*x+b1, so (y1-y0)/(x1-x0)=-1/m1

    7. 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?










    share|cite|improve this question
























      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:




      1. problem in first quadrant: x>0, y>0

      2. line y=m1*x+b1 with m1<=0, b1>=0

      3. line y=m2*x+b2 with m2 < m1, b2>b1

      4. circle centre above y=m1*x+b1, so y0>y1

      5. circle centre at r.h.s. of y=m2*x+b2, so x0>x2

      6. circle tangent to line y=m1*x+b1, so (y1-y0)/(x1-x0)=-1/m1

      7. 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?










      share|cite|improve this question













      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:




      1. problem in first quadrant: x>0, y>0

      2. line y=m1*x+b1 with m1<=0, b1>=0

      3. line y=m2*x+b2 with m2 < m1, b2>b1

      4. circle centre above y=m1*x+b1, so y0>y1

      5. circle centre at r.h.s. of y=m2*x+b2, so x0>x2

      6. circle tangent to line y=m1*x+b1, so (y1-y0)/(x1-x0)=-1/m1

      7. 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






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Nov 17 at 18:53









      J. Serra

      1




      1






















          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.






          share|cite|improve this answer





















          • 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











          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',
          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%2f3002687%2ffind-tangent-points-of-circle-and-two-lines-in-first-quadrant%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








          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.






          share|cite|improve this answer





















          • 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















          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.






          share|cite|improve this answer





















          • 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













          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.






          share|cite|improve this answer












          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.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Nov 17 at 22:03









          MvG

          30.5k448100




          30.5k448100












          • 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




          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


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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.


          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%2f3002687%2ffind-tangent-points-of-circle-and-two-lines-in-first-quadrant%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

          Plaza Victoria

          In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

          How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...