Trekantens vinkelhalveringslinjer skæres i et punkt. Vinkelhalveringslinjen er en linje gennem et hjørne, som deler hjørnets vinkel i to lige store dele. Du kan flytte trekantens hjørner, A, B og C, med musen. Læg mærke til, at de tre vinkelhalveringslinjer altid har et fælles punkt, P. Dette punkt er centrum for trekantens indskrevne cirkel.
Figure figure = Position [0,0] Size[x,y] Origin[x/3,y/2] Unit x/12 Color "white";
//Axes axes = Color "black";
//Grid grid = Color "blue";
//Units units = Color "black";
Point A = [-2,-1] Free Size 2.5 Color "red";
Point B = [5,-1] Free Size 2.5 Color "red";
Point C = [0,3] Free Size 2.5 Color "red";
Label laba = "A" At A Offset [0,-15] Color "black";
Label labb = "B" At B Offset [0,-15] Color "black";
Label labc = "C" At C Offset [0,-15] Color "black";
Variable orientation = if (B-A)*(C-A)^ < 0 then 1 else 0 endif;
Angle anga = At A From angle(orientation*B+(1-orientation)*C-A)
To angle(orientation*C+(1-orientation)*B-A)
Size 0.3 Color "black";
Angle angb = At B From angle(orientation*C+(1-orientation)*A-B)
To angle(orientation*A+(1-orientation)*C-B)
Size 0.3 Color "black";
Angle angc = At C From angle(orientation*A+(1-orientation)*B-C)
To angle(orientation*B+(1-orientation)*A-C)
Size 0.3 Color "black";
Line ab = Start A Dir B-A Size 1 Color "black";
Line bc = Start B Dir C-B Size 1 Color "black";
Line ca = Start C Dir A-C Size 1 Color "black";
Variable dira = (angle(B-A)+angle(C-A))/2;
Line va = Start A Dir [cos(dira),sin(dira)] Infinite Size 0.8 Color "blue";
Variable dirb = (angle(A-B)+angle(C-B))/2;
Line vb = Start B Dir [cos(dirb),sin(dirb)] Infinite Size 0.8 Color "blue";
Variable dirc = (angle(B-C)+angle(A-C))/2;
Line vc = Start C Dir [cos(dirc),sin(dirc)] Infinite Size 0.8 Color "blue";
Point P = intersect(A,A+[cos(dira),sin(dira)],B,B+[cos(dirb),sin(dirb)]) Size 2.5 Color "blue";
Label labp = "P" At P Offset [10,-5] Color "black";
Circle circle = Center P Radius length(P-project(P,A,B)) Size 0.8 Color "blue";