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:這很有道理,謝謝! –