简体   繁体   English

圆与两条线的交点之间的距离

[英]Distance between intersection of circle and 2 lines

在此处输入图片说明

I feel like this should be simple, but I am unable to find any solutions.我觉得这应该很简单,但我找不到任何解决方案。 I am trying to find the distance between the 2 points (red line) where a circle of radius r intersects 2 lines, given the angle between the lines.给定线之间的角度,我试图找到半径为 r 的圆与 2 条线相交的 2 个点(红线)之间的距离。

How can I find the 2 intersecting points?我怎样才能找到2个相交点?

It's just a mathematical problem, first you can find the slope of your lines using (respectively for degrees and radians):这只是一个数学问题,首先您可以使用(分别为度和弧度)找到线的斜率:

m=\\tan\\left(\\frac{\\alpha}{2\\cdot180}\\pi\\right)

m=\\tan\\left(\\frac{\\alpha}{2}\\right)

Then, writing down the equations for the intersections of the lines and (half of) the circle, you obtain:然后,写下直线和(一半)​​圆的交点的方程,你得到: m=m^{2}r^{2}-m^{2}y^{2}=q^{2}%2By^{2}-2qy)

Solving the equation imposing to have a unique solution to have the lines as tangents you obtain the intercept:求解具有唯一解的方程,使线作为切线,您将获得截距:

q=r\\sqrt{1%2Bm^{2}})

and then:进而:

y_{1}=\\frac{q}{1%2Bm^{2}}

The y of the lower point is just -y1, so the overall distance is, after some simplifications:较低点的 y 仅为 -y1,因此经过一些简化后,总距离为:

2r\\cos\\left(\\frac{\\alpha}{2\\cdot180}\\pi\\right) (Degrees) (度数)

2r\\cos\\left(\\frac{\\alpha}{2\\cdot180}\\pi\\right) (Radians) (弧度)

Interactive version互动版

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM