Comments and answers for "Get the raod turn radius"
http://answers.unity.com/questions/1424047/get-the-raod-turn-radius.html
The latest comments and answers for the question "Get the raod turn radius"Comment by elenzil on elenzil's answer
http://answers.unity.com/comments/1424293/view.html
also in general, when you need functions for stuff like line-intersect-line, you can't do better than to visit the pages of [Paul Bourke][1]. he's correct and succinct.
[1]: http://paulbourke.net/geometry/Mon, 23 Oct 2017 01:18:01 GMTelenzilAnswer by elenzil
http://answers.unity.com/answers/1424291/view.html
nice question.
so you have A and B as points on the circle, and then you also have vA and vB, the vectors *tangent* to the circle at those points. from those, you can create perpendicular vAP and vBP by rotating vA and vB 90ยบ each. since they're perpendicular to the tangents, that means they're *normal* to the surface of the circle, and they will intersect at the center of the circle.
There's a billion line-intersection routines in the world, and [LineLineIntersection() from here looks reasonable][1].
There's a couple edge-cases where this approach won't work:
1. if points A and B are the same, it's impossible to know. also as vA and vB approach being parallel or anti-parallel, the accuracy will decrease.
2. if A and B are on exactly opposite sides of the circle, then the line-intersection approach will not yield a specific solution. I would add some logic before the line-intersection stuff which tests the dot-product of vAN and vBN. (vAN = the normalized version of vA). if that value is close to -1 (eg, less that -0.999, say) then you can conclude that A and B are on opposite sides of the circle, and the center of the circle is (A + B) / 2.
[1]: http://wiki.unity3d.com/index.php/3d_Math_functionsMon, 23 Oct 2017 01:13:01 GMTelenzil