.PS define dot { circle diam 0.05 fill 1 } define triangle { polygon up 1 \ then down 0.5 right 0.6 \ shaded "blue" \ thickness 1 \ } define hexagon { polygon up 0.5 right 0.5 \ then right 1 \ then right 0.5 down 0.5 \ then down 0.5 left 0.5 \ then left 1 \ fill 0.5 \ } line TRI1: triangle with .p1 at last line.end line right 1.5 from TRI1.v3 for i = 1 to 3 do { dot at TRI1.vi dot at TRI1.pi } "P1" at TRI1.p`1' + (-0.1, 0.1) "P2" at TRI1.p`2' + (0.1, 0.1) "P3" at TRI1.p`3' + (0.1, -0.1) "V1" at TRI1.v`1' + (-0.1, -0.1) "V2" at TRI1.v`2' + (-0.1, 0.1) "V3" at TRI1.v`3' + (0.1, 0.1) HEX1: hexagon with .v1 at last line.end "Hex" for i = 1 to 6 do { dot at HEX1.vi dot at HEX1.pi } line right from HEX1.v4 "P1" at HEX1.p`1' + (-0.1, 0.1) "P2" at HEX1.p`2' + (0.0, 0.1) "P3" at HEX1.p`3' + (0.1, 0.1) "P4" at HEX1.p`4' + (0.1, -0.1) "P5" at HEX1.p`5' + (0.0, -0.1) "P6" at HEX1.p`6' + (-0.1, -0.1) "V1" at HEX1.v`1' + (-0.1, 0.1) "V2" at HEX1.v`2' + (-0.1, 0.1) "V3" at HEX1.v`3' + (0.1, 0.1) "V4" at HEX1.v`4' + (0.1, 0.1) "V5" at HEX1.v`5' + (0.1, -0.1) "V6" at HEX1.v`6' + (-0.1, -0.1) .PE .PS polygon right 2 \ then down 1 left 1.5 \ then up 2 right 0.5 \ fill 0.5 circle rad 0.05 fill 1 at last polygon.c "\s'+4'.c (centroid)\s'-4'" at last polygon.c + (0.5, 0.1) .PE .PS polygon right 2 \ then down 1.3 left 1.5 \ then up 2 right 0.5 \ then down 2 right 0.5 \ fill 0.5 .PE