0
我有两个可以相交的圆,如果是这种情况,我会计算最接近该交集区的最大圆的坐标。计算最接近2个圆的交点的圆的坐标
我画了一个草图在SVG代表问题:
<svg width="400" height="400">
<line x1="85" y1="50" x2="140" y2="70" stroke="rgb(50,50,50)" stroke-width="1" />
<circle cx="85" cy="50" r="50" stroke="rgba(50,50,50,0.8)" stroke-width="1" fill="rgba(0,0,150,0.3)" />
<circle cx="140" cy="70" r="40" stroke="rgba(50,50,50,0.8)" stroke-width="1" fill="rgba(150,0,0,0.3)" />
<circle cx="117" cy="62" r="16" stroke="rgba(50,50,50,0.8)" stroke-width="1" fill="rgba(00,150,0,0.3)" />
</svg>
您可以在线尝试在这里:http://www.w3schools.com/svg/tryit.asp?filename=trysvg_line。
我的头两个圆圈是第三个圆的中心和半径(在我用手画的例子中)。
您是指“近似”交叉区域的含义? - 您的在线SVG在我的浏览器中不起作用,也许您可以为您的问题添加图片。 –
Tryit中的代码与上面的代码不匹配,如果将代码替换为上述代码,您将得到所需的图 – jing3142
@ jing3142:这很有道理,谢谢! –