# Question:How to draw a inscribed circle and a circumscribed circle ?

## Question:How to draw a inscribed circle and a circumscribed circle ?

Maple 2018

Let Q be a quadrilateral which has a inscribed circle and a circumscribed circle. Show that the centers of these 2 circles and the point of intersection of the diagonals

restart; unprotect(D, O);

with(plots); with(LinearAlgebra);
Soit Q un quadrilatère qui possède un cercle inscrit et un cercle circonscrit. Montrer que les centres de ces 2 cercles et le point d'intersection des diagonales
_EnvHorizontalName := 'x';

_EnvVerticalName := 'y';

Vdot := proc (U, V) add(U[i]*V[i], i = 1 .. 2) end proc;
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end proc;
EQ := proc (M, N) local eq; eq := (y-M[2])/(x-M[1]) = (N[2]-M[2])/(N[1]-M[1]) end proc;
Pour un quadrilatère A'B'C'D' circonscrit autour d'un cercle avec points de contact A, B, C, D, les droites A'C', B'D', AC, BD sont concourantes
varphi1 := (1/3)*Pi; varphi2 := varphi1+(1/4)*Pi+.1; varphi3 := varphi2+3*Pi*(1/5); varphi4 := 2*Pi-varphi1-varphi2-varphi3; R := 5;
varphi4 := -0.514159263
O := [0, 0];
for i to 4 do M || i := [R*cos(varphi || i), R*sin(varphi || i)]; OM || i := plot([O, M || i], color = blue, linestyle = 3); cfOM || i := -1/(diff(solve(EQ(O, M || i), y), x)); eq || i := y = cfOM || i*x+R*sin(varphi || i)-cfOM || i*R*cos(varphi || i); T || i := plot(cfOM || i*x+R*sin(varphi || i)-cfOM || i*R*cos(varphi || i), x = -10 .. 10, color = green) end do;

for i to 4 do j := `mod`(i+1, 4); if j = 0 then j := 4 end if; sol || i := evalf(op(solve([eq || i, eq || j], [x, y]))); P || i := [subs(sol || i, x), subs(sol || i, y)] end do;
for i to 4 do Q || i := geometry:-point(Q || i, P || i[1], P || i[2]) end do;
geometry:-AreConcyclic(Q1, Q2, Q3, Q4, 'cond');
false
AC := plot([M1, M3], color = blue);
BD := plot([M2, M4], color = blue);
diago1 := plot([P1, P3], color = coral); diago2 := plot([P2, P4], color = coral);
quadri := plot([seq(M || i, i = 1 .. 4), M1], color = black);
cer := plot([R*cos(t), R*sin(t), t = 0 .. 2*Pi], color = blue);
Points1 := pointplot([seq(M || i[], i = 1 .. 4)], symbol = solidcircle, color = [blue], symbolsize = 15);
Points2 := pointplot([seq(P || i[], i = 1 .. 4)], symbol = solidcircle, color = [green], symbolsize = 15);
Tt1 := plots:-textplot([[M1[], "A"], [M2[], "B"], [M3[], "C"], [M4[], "D"]], font = [times, 10], align = {below, right});
Tt2 := plots:-textplot([[P1[], "A'"], [P2[], "B'"], [P3[], "C'"], [P4[], "D'"], [O[], "O"]], font = [times, 15], align = {above, right});
display([cer, quadri, seq(OM || i, i = 1 .. 4), seq(T || i, i = 1 .. 4), AC, BD, diago1, diago2, Points1, Points2, Tt1, Tt2], axes = none, view = [-9 .. 7, -12 .. 6], scaling = constrained, size = [500, 500]);

﻿