Source
-0.5 4.5 setxrange
-0.5 4.5 setyrange

1 setxyrapport
60 setxunit
7.5 setborder
90 setangle_repere
-1 4 setxrange
-1 1 setyrange

/M {0 0} def
/N {2 0} def
/X {4 0} def
/B {0 2} def
/C {2 2} def
/Y {4 2} def
/A {0 4} def
/D {2 4} def
/Z {4 4} def
/P {1.2 2.2} def
/Q {0.2 3.8} def
/R {1.85 3.3} def
/P1 {1.7 0} def
/P2 {0.4 0.3} def
/P3 {1.7 1.5} def
/P4 {3 1} def
/P5 {3.4 3.9} def
/P6 {2.5 3.5} def
/PP {1.2 1} def
/QQ {1.2 4.4} def
/E {Q PP QQ orthoproj} def
/F {R PP QQ orthoproj} def
/S {PP QQ R Q interdroite} def
[A B C D S E F] points
gsave
pointilles
[PP QQ] ligne
[Q E] ligne
[R F] ligne
grestore

[A M X Z] polygone
[P Q R] polygone
[B Y] ligne
[N D] ligne
P F R angledroit
Q E P angledroit
B 1.2 2 PP angledroit


/dotscale {2.0 dup} def
gsave
[P Q R P1 P2 P3 P4 P5 P6 ] {point} plot
grestore

(A) A [1.4 dup] ultext
(B) B [1.4 dup] cltext
(C) C [1.4 dup] urtext
(D) D [1.4 dup] uctext
(P) 1.1 2.3 [1.4 dup] cltext
(Q) 0 3.6 [1.4 dup] crtext
(R) 1.85 3.4 [1.4 dup] uctext
(E) E [1.2 dup] crtext
(F) F [1.2 dup] cltext
(S) 1.2 3.45 [1.2 dup] urtext
<latex>
$\frac{1}{2}$
</latex>
0 3 [1.6 dup] cltexlabel