How can I draw a curve which is part of the circle (depending on the end point)?
I((B.x + C.x) / 2, (B.y + C.y) / 2) be the middle point of
I'(I.x + I.y - C.y, I.y + C.x - I.x) (90° rotation of
I). Then the perpendicular to
(BC) going through
I + tII' (for any real number
t). Likewise with
B' be the 90° rotation of
B, the perpendicular to
(AB) going through
B + uBB' (for any real number
Now you just have to find the intersection point of these two lines. See here for related issues.