How to determine distance to a point on arc perpendicular from tangent?

Given the following from the image below:

  • The green circle has a radius equal to B
  • The yellow line is tangent to the green circle
  • The vertical purple line is parallel to the green line and perpendicular to the yellow line.
  • The yellow line is perpendicular to both the green line and the vertical purple line
  • The purple point is centered on the green circle's edge
  • A and B are known values
  • I realize several of these constraints overlap, just trying to be thorough. Pythagorean's theorem can provide the value of C , just to illustrate what I know we can determine already.

    What is the formula/equation to determine D , where D is the perpendicular distance from the tangent yellow line to the arc/circle (at the purple point)?

    垂直于距切线的点的距离

    Update

    Replacing previous attempts to illustrate solution now with one that I can now visualize as the correct representation of the answer and comments provided by John

    解决方案图像


    The distance D can be found by computing the lowest intersection between the vertical ray from the right endpoint of the yellow segment and the circle.

    Some notations ( x axis to the right, y axis to the bottom, origin at the center of the circle):

  • center of the circle: P_C = (0, 0)
  • origin of the vertical ray: P_O = (A, B)
  • direction of the vertical ray: v_d = (0, -1)
  • Points on the ray satisfy: P = P_O + t v_d = (A, B - t)

    Points on the circle satisfy: |P P_O|^2 = B^2

    Expanding the first equation into the second gives: A^2 + (B - t)^2 = B^2 = A^2 + B^2 - 2 B t + t^2

    Solving t^2 - 2 B t + A^2 = 0 for t yields d = B^2 - A^2 > 0 , so two solutions t_1 = B - sqrt(d) , t_2 = B + sqrt(d) (one near the bottom of the circle, the other near the top as expected). But t actually gives the distance along the ray (since v_d is a unit vector), so what we are looking for is the smallest solution t_1 . Hence D = B - sqrt(B^2 - A^2) .

    The final result can also be derived and / or verified geometrically (courtesy of John, see all the corresponding comments): D = B - B' and B'^2 + A^2 = B^2 (Pythagorus on the right triangle with the center of the circle and the purple point as two of its vertices and an edge sitting on the purple line).


    As you mentioned C is the easy part. However with A,B,C and the cosine theorem you can work out the angel opposite to B (b):

    cos(b) = (a^2 + c^2 -b^2)/(2ac)
    

    knowing b and that A and D have a right angel you can work out the angle between C and D (b'):

    b' = 90° - b
    

    given that D lies on the circle you know that the distance from the center to D is B so you now have a triangle with sides B,D and C where you know two of the sides and one of the angles. With the cosine law again:

    B^2 = C^2 + D^2 - 2CD cos(b')
    

    so in one more step we can find:

    B^2 - C^2 = D^2 - 2CD cos(b') + (C cos(b'))^2 -(C cos(b'))^2 <=>
    B^2 - C^2 + (C cos(b'))^2 = (D - C cos(b'))^2 <=>
    sqrt(B^2 - C^2 + (C cos(b'))^2) + C cos(b') = D
    

    hope I didn't put stupid mistakes in there and this helps...

    链接地址: http://www.djcxy.com/p/84988.html

    上一篇: 在D3中从圆计算中优化路径距离

    下一篇: 如何确定与切线垂直的圆弧上的点的距离?