Gergonne Point, can't find coordinates of points of tangency of the inscribed circle

This is my attempt to demonstrate properties of Gergonne point, but i'm new in mathematica and have troubles with finding points of tangency for inscribed circle...
InCircle[{x1_, y1_}, {x2_, y2_}, {x3_, y3_}] := With[{
u = Norm[{x2, y2} - {x3, y3}],
v = Norm[{x3, y3} - {x1, y1}],
w = Norm[{x1, y1} - {x2, y2}]},
Circle[(u {x1, y1} + v {x2, y2} + w {x3, y3})/(u + v + w),
1/2 Sqrt[-(((u - v - w) (u + v - w) (u - v + w)))/(u + v + w)]]];
Manipulate[
Graphics[{Thick, Green, Line[{a[[1]], a[[2]], a[[3]], a[[1]]}], Red,
Thick, InCircle[a[[1]], a[[2]], a[[3]]], Red,
PointSize[Large],Point[{a[[4]]}]},
PlotRange -> 6.0], {{a, {{-1, -1}, {1, -1}, {0, 1}}}, Locator}]    

Комментарии

Популярные сообщения из этого блога

Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository … doesn't support architecture 'i386'

FillChar and StringOfChar under Delphi 10.2 for Win64 Release Target

Least number of vertices in a graph with which one can uniquely recover some partition of N