(progn
    (defun ShowTriangle ()
        (setq A (Vertex (Pos 0.45 0.6)))
        (Vertex (Pos 0.42 0.62) (Size 0.03 0.03) (Color "Bg") (Label "A")
          (FontColor "Fg"))
        (setq B (Vertex (Pos 0.6 0.6)))
        (Vertex (Pos 0.62 0.62) (Size 0.03 0.03) (Color "Bg") (Label "B")
          (FontColor "Fg"))
        (setq C (Vertex  (Pos 0.45 0.4)))
        (Vertex (Pos 0.43 0.38) (Size 0.03 0.03) (Color "Bg") (Label "C")
          (FontColor "Fg"))
        (setq AB (Edge (Vertices A B)))
        (setq BC (Edge (Vertices B C)))
        (setq AC (Edge (Vertices A C))))
    (defun ShowBigSquare ()
        (setq D (Vertex  (Pos 0.8 0.45)))
        (setq E (Vertex (Pos 0.65 0.25)))
        (setq BDEC (Polygon (Color "VeryLightBlue") (Vertices B D E C))))
    (defun ShowLittleSquares ()
        (setq F (Vertex (Pos 0.6 0.75)))
        (setq G (Vertex (Pos 0.45 0.75)))
        (setq H (Vertex (Pos 0.25 0.6)))
        (setq K (Vertex (Pos 0.25 0.4)))
        (setq BFGA (Polygon (Color "Pink") (Vertices B F G A)))
        (setq AHKC (Polygon (Color "Pink") (Vertices A H K C))))
    (defun ClearSquares ()
        (set BFGA (Color "Bg")) 
        (set AHKC (Color "Bg"))
        (set BDEC (Color "Bg")))
    (defun ShowLabeledBigSquare ()
        (setq BD (Edge (Vertices B D)))
        (setq DE (Edge (Vertices D E)))
        (setq EC (Edge (Vertices E C)))
        (Vertex (Pos 0.82 0.45) (Size 0.03 0.03) (Color "Bg") (Label "D")
          (FontColor "Fg"))
        (Vertex (Pos 0.67 0.23) (Size 0.03 0.03) (Color "Bg") (Label "E")
          (FontColor "Fg"))
        (set BDEC (Color "VeryLightBlue")))
    (defun ShowLabeledLittleSquares ()
        (setq BF (Edge (Vertices B F)))
        (setq FG (Edge (Vertices F G)))
        (setq GA (Edge (Vertices G A)))
        (setq AH (Edge (Vertices A H)))
        (setq HK (Edge (Vertices H K)))
        (setq KC (Edge (Vertices K C)))
        (set BFGA (Color "Pink")) 
        (set AHKC (Color "Pink"))
        (Vertex (Pos 0.62 0.77) (Size 0.03 0.03) (Color "Bg") (Label "F")
          (FontColor "Fg"))
        (Vertex (Pos 0.43 0.77) (Size 0.03 0.03) (Color "Bg") (Label "G")
          (FontColor "Fg"))
        (Vertex (Pos 0.23 0.62) (Size 0.03 0.03) (Color "Bg") (Label "H")
          (FontColor "Fg"))
        (Vertex (Pos 0.23 0.38) (Size 0.03 0.03) (Color "Bg") (Label "K")
          (FontColor "Fg")))
    (defun RedLineAL ()
        (setq L (Vertex (Pos 0.746 0.378)))
        (Vertex (Pos 0.775 0.378) (Size 0.03 0.03) (Color "Bg") (Label "L")
          (FontColor "Fg"))
        (setq AL (Edge (Vertices A L) (Width 0.014) (Color "Red"))))
    (defun GreenLinesBDandCE ()
        (set BD (Width 0.014) (Color "Green"))
        (set EC (Width 0.014) (Color "Green")))
    (defun BlackLinesABandBDandCE ()
        (set BD (Width 0.007) (Color "Fg"))
        (set EC (Width 0.007) (Color "Fg"))
        (set AL (Width 0.007) (Color "Fg")))
    (defun TriangleABF ()
        (setq vt1 (Vertex (Pos 0.45 0.6)))
        (setq vt2 (Vertex (Pos 0.6 0.6)))
        (setq vt3 (Vertex (Pos 0.6 0.75)))
        (setq et12 (Edge (Vertices vt1 vt2) (Width 0.001)))
        (setq et13 (Edge (Vertices vt1 vt3) (Width 0.001)))
        (setq et23 (Edge (Vertices vt2 vt3) (Width 0.001)))
        (setq t1 (Polygon (Vertices vt1 vt2 vt3) (Color "VeryLightBlue"))))
    (defun ShearABFtoCBF ()
        (Move (Elements vt1) (Path AC)))
    (defun GreenLineBF ()
        (set BF (Width 0.014) (Color "Green")))
    (defun GreenLineCG ()
        (set GA (Width 0.014) (Color "Green"))
        (set AC (Width 0.014) (Color "Green")))
    (defun BlackLinesBFandCG ()
        (set GA (Width 0.007) (Color "Fg"))
        (set AC (Width 0.007) (Color "Fg"))
        (set BF (Width 0.007) (Color "Fg")))
    (defun GreenAngleCBD ()
        (setq a1 (Arc (Center B) (Radius 0.05)
                 (Angle 1.2687e2 3.687e1) (Width 0.014) (Color "Green"))))
    (defun GreenAngleABF ()
        (setq a2 (Arc (Center B) (Radius 0.05) (Angle 270 180)
               (Width 0.014) (Color "Green"))))
    (defun RedAngleABC ()
        (setq ABC (Arc (Center B) (Radius 0.05) (Angle 1.2687e2 180)
                 (Width 0.014) (Color "Red"))))
    (defun ReplaceAnglesWithGreenCBF ()
        (set a1 (Width 0))
        (set a2 (Width 0))
        (set ABC (Angle 1.2687e2 270)))
    (defun RotateCBF ()
        (Rotate (Center B) (Elements ABC) (Angle -90)))
    (defun ClearAngle ()
      (set ABC (Width 0)))
    (defun GreenLineBF2 ()
      (setq ve1 (Vertex (Pos 0.6 0.75)))
      (setq e1 (Edge (Vertices B ve1) (Width 0.014) (Color "Green"))))
    (defun RotateLineBF ()
       (set a2 (Radius 0.15))
       (Move (Elements ve1) (Path a2)))
    (defun MoveBFtoBC ()
        (Move (Elements ve1) (Path AC) (Animate nil)))
    (defun RotateLineBC () 
        (set a1 (Radius 0.25))
        (Move (Elements ve1) (Path a1)))
    (defun RemoveLineBC () 
      (set e1 (Width 0)))
    (defun RotateCBFtoDBA () 
       (Move (Elements vt3) (Path a2))
       (Move (Elements vt1) (Path a1)))
    (defun ShearABDtoBDL ()
      (Move (Elements vt3) (Path AL)))
    (defun GreenLineBD ()
      (set BD (Width 0.014) (Color "Green")))
    (defun GreenLineAL ()
        (set AL (Width 0.014) (Color "Green")))
    (defun ClearBDLandBDandAL ()
        (set AL (Width 0.007) (Color "Fg"))
        (set BD (Width 0.007) (Color "Fg")))
    (defun ShowABF ()
        (set t1 (Color "Bg")) (set et23 (Width 0))
        (setq t2 (Polygon (Vertices A B F) (Color "VeryLightBlue")))
        (setq AF (Edge (Vertices A F) (Width 0.001))))
    (defun ShowBDL ()
        (set t1 (Color "VeryLightBlue"))
        (set et23 (Width 0.001)))
    (defun ReplaceABFandBDLwithABFG ()
        (setq X (Vertex (Pos 0.546 0.528)))
        (set BFGA (Color "VeryLightBlue"))
        (set t1 (Color "Bg") (Vertices X))
        (set et23 (Width 0))
        (set t2 (Color "Bg") (Vertices X))
        (set AF (Width 0)))
    (defun ShowBDLX ()
        (setq BL (Polygon (Vertices B D L X) (Color "VeryLightBlue"))))
    (defun ShowACK ()
        (set t1 (Color "Pink") (Vertices vt1 vt2 vt3))
        (set et23 (Width 0.001))
        (Move (Elements vt1) (Pos 0.45 0.6) (Animate nil))
        (Move (Elements vt2) (Pos 0.45 0.4) (Animate nil))
        (Move (Elements vt3) (Pos 0.25 0.4) (Animate nil)))
    (defun ShearRotateShearACKtoCEL ()
        (Frame (Time 0 2) (Actions (Move (Elements vt1) (Path AB))))
        (set a1 (Center C) (Radius 0.25) (Angle -5.317e1 3.687e1))
        (set a2 (Center C) (Radius 0.2) (Angle 180 270))
        (Frame (Time 0 2) (Actions (Move (Elements vt1) (Path a1))
                                   (Move (Elements vt3) (Path a2))))
        (Frame (Time 0 2) (Actions (Move (Elements vt3) (Path AL)))))
    (defun ReplaceCELwithACKH ()
        (set AHKC (Color"Pink")) (set t1 (Color "Bg"))
        (set et23 (Width 0)))
    (defun ShowCELX ()
        (set t1 (Color "Pink") (Vertices C E L X)))

(Graph (Aspect 1) (Time 0 1))
)

