c04ex03.pyw
Draws a face
Author: Cody Leistikow (10/4/02)
from graphics import *
def main():
win=GraphWin('Face',400,420)
win.setBackground("white")
neck = Polygon(Point(177,352),Point(176,371),Point(162,398),Point(170,400),Point(185,391),Point(231,373),Point(260,368),Point(287,357),Point(312,333),Point(235,311))
neck.setFill(color_rgb(239,222,215))
head = Polygon(Point(136,228),Point(107,260),Point(110,279),Point(129,302),Point(140,321),Point(175,350),Point(193,348),Point(234,312),Point(238,296),Point(255,291),Point(272,266),Point(271,240),Point(264,226),Point(253,224),Point(239,239),Point(243,193))
head.setFill(color_rgb(239,222,215))
headdark1 = Polygon(Point(184,212),Point(190,217),Point(194,261),Point(173,286),Point(198,284),Point(204,310),Point(203,321),Point(200,333),Point(192,346),Point(202,352),Point(206,351),Point(206,372),Point(225,339),Point(218,377),Point(236,371),Point(252,344),Point(258,342),Point(257,369),Point(286,358),Point(294,339),Point(300,343),Point(312,334),Point(295,319),Point(282,313),Point(276,292),Point(258,289),Point(242,296),Point(236,291),Point(240,284),Point(242,278),Point(247,278),Point(249,268),Point(240,265),Point(242,258),Point(234,261),Point(258,185))
headdark1.setFill(color_rgb(226,179,154))
headdark2 = Polygon(Point(133,231),Point(123,241),Point(112,273),Point(117,275),Point(148,227))
headdark2.setFill(color_rgb(226,179,154))
headdark3 = Polygon(Point(177,218),Point(161,279),Point(168,221))
headdark3.setFill(color_rgb(226,179,154))
neckline1 = Line(Point(182,365),Point(185,390))
neckline2 = Line(Point(199,385),Point(219,350))
neckline3 = Line(Point(219,350),Point(230,324))
neckline4 = Line(Point(225,374),Point(235,340))
neckline5 = Line(Point(282,313),Point(288,334))
throat = Polygon(Point(189,366),Point(192,381),Point(186,373))
throat.setFill(color_rgb(117,110,105))
headline1 = Line(Point(193,349),Point(212,334))
headline2 = Line(Point(212,334),Point(234,312))
headline3 = Line(Point(234,312),Point(241,294))
headline4 = Line(Point(135,279),Point(140,292))
headline5 = Line(Point(149,279),Point(154,289))
innerear = Polygon(Point(263,249),Point(262,240),Point(257,234),Point(241,259),Point(242,267),Point(248,269),Point(249,277),Point(242,279),Point(241,283),Point(260,271),Point(263,265),Point(253,260),Point(254,251))
innerear.setFill(color_rgb(201,153,145))
earline1 = Line(Point(247,249),Point(258,249))
earline2 = Line(Point(248,268),Point(255,264))
earline3 = Line(Point(241,261),Point(255,261))
earline4 = Line(Point(255,261),Point(257,272))
earline5 = Line(Point(257,272),Point(265,264))
chin = Polygon(Point(161,326),Point(176,327),Point(179,330),Point(165,330))
chin.setFill(color_rgb(215,178,182))
mouthline1 = Line(Point(154,320),Point(158,322))
mouthline2 = Line(Point(158,322),Point(171,318))
mouthline3 = Line(Point(171,318),Point(179,318))
noseline1 = Line(Point(146,303),Point(146,311))
noseline2 = Line(Point(146,311),Point(141,319))
noseline3 = Line(Point(141,319),Point(156,312))
lefteye = Polygon(Point(120,282),Point(140,293),Point(128,293))
lefteye.setFill(color_rgb(255,255,255))
righteye = Polygon(Point(163,286),Point(166,289),Point(197,277),Point(199,264))
righteye.setFill(color_rgb(255,255,255))
leftiris = Polygon(Point(128,287),Point(131,291),Point(137,290))
leftiris.setFill(color_rgb(100,150,131))
rightiris = Polygon(Point(168,282),Point(172,284),Point(179,275))
rightiris.setFill(color_rgb(100,150,131))
lefteyebrow = Polygon(Point(111,272),Point(140,290),Point(140,292),Point(111,276))
lefteyebrow.setFill(color_rgb(247,218,116))
righteyebrow = Polygon(Point(156,288),Point(209,251),Point(212,258),Point(157,288))
righteyebrow.setFill(color_rgb(247,218,116))
hairbg = Polygon(Point(49,110),Point(74,155),Point(89,103),Point(117,43),Point(127,96),Point(144,65),Point(198,21),Point(180,70),Point(230,32),Point(276,13),Point(241,77),Point(335,34),Point(310,74),Point(323,71),Point(331,65),Point(332,68),Point(363,45),Point(340,136),Point(356,125),Point(350,144),Point(381,124),Point(337,222),Point(309,240),Point(359,249),Point(294,276),Point(334,286),Point(275,297),Point(258,287),Point(272,264),Point(268,233),Point(264,225),Point(252,225),Point(239,238),Point(226,230),Point(228,219),Point(197,260),Point(210,221),Point(210,205),Point(175,217),Point(166,248),Point(142,294),Point(162,221),Point(136,230),Point(106,261),Point(110,277),Point(114,289),Point(116,317),Point(93,288),Point(94,278),Point(75,318),Point(76,274),Point(62,273),Point(69,247),Point(18,253),Point(67,215),Point(53,191))
hairbg.setFill(color_rgb(247,218,116))
hairdark1 = Polygon(Point(50,114),Point(74,156),Point(71,177))
hairdark1.setFill(color_rgb(235,161,56))
hairdark2 = Polygon(Point(47,243),Point(93,225),Point(89,239))
hairdark2.setFill(color_rgb(235,161,56))
hairdark3 = Polygon(Point(128,214),Point(94,256),Point(75,317),Point(99,270))
hairdark3.setFill(color_rgb(235,161,56))
hairdark4 = Polygon(Point(105,266),Point(116,313),Point(114,283))
hairdark4.setFill(color_rgb(235,161,56))
hairdark5 = Polygon(Point(119,45),Point(107,106),Point(112,170),Point(124,203),Point(129,200),Point(130,164),Point(121,139),Point(125,91),Point(117,43))
hairdark5.setFill(color_rgb(235,161,56))
hairdark6 = Polygon(Point(173,126),Point(145,193),Point(157,201),Point(157,216),Point(169,204),Point(186,176),Point(201,161),Point(213,122),Point(223,79),Point(234,55),Point(204,109),Point(160,186),Point(155,187),Point(179,117))
hairdark6.setFill(color_rgb(235,161,56))
hairdark7 = Polygon(Point(176,217),Point(253,115),Point(225,194),Point(212,192),Point(203,207))
hairdark7.setFill(color_rgb(235,161,56))
hairdark8 = Polygon(Point(222,86),Point(272,19),Point(240,77))
hairdark8.setFill(color_rgb(235,161,56))
hairdark9 = Polygon(Point(217,111),Point(284,65),Point(209,138))
hairdark9.setFill(color_rgb(235,161,56))
hairdark10 = Polygon(Point(217,192),Point(219,230),Point(230,216),Point(224,193))
hairdark10.setFill(color_rgb(235,161,56))
hairdark11 = Polygon(Point(216,109),Point(252,84),Point(283,66),Point(208,141))
hairdark11.setFill(color_rgb(235,161,56))
hairdark12 = Polygon(Point(238,161),Point(274,140),Point(228,185))
hairdark12.setFill(color_rgb(235,161,56))
hairdark13 = Polygon(Point(248,144),Point(298,73),Point(335,33),Point(307,77),Point(303,97))
hairdark13.setFill(color_rgb(235,161,56))
hairdark14 = Polygon(Point(249,205),Point(300,142),Point(331,67),Point(321,152))
hairdark14.setFill(color_rgb(235,161,56))
hairdark15 = Polygon(Point(321,152),Point(324,137),Point(357,65),Point(340,135))
hairdark15.setFill(color_rgb(235,161,56))
hairdark16 = Polygon(Point(142,138),Point(160,77),Point(180,48),Point(166,87),Point(166,114))
hairdark16.setFill(color_rgb(235,161,56))
hairdark17 = Polygon(Point(226,198),Point(252,183),Point(242,203),Point(246,216),Point(301,184),Point(282,219),Point(331,174),Point(349,144),Point(322,210),Point(358,174),Point(338,221),Point(308,240),Point(294,239),Point(283,256),Point(357,250),Point(276,282),Point(331,286),Point(276,296),Point(258,287),Point(273,265),Point(270,239),Point(265,224),Point(254,224),Point(240,238),Point(227,231),Point(228,220),Point(227,207))
hairdark17.setFill(color_rgb(235,161,56))
hairline1 = Line(Point(72,176),Point(84,206))
hairline2 = Line(Point(68,215),Point(84,206))
hairline3 = Line(Point(84,206),Point(109,208))
hairline4 = Line(Point(70,246),Point(86,246))
hairline5 = Line(Point(98,214),Point(77,276))
hairline6 = Line(Point(98,214),Point(146,194))
hairline7 = Line(Point(128,196),Point(133,147))
hairline8 = Line(Point(133,147),Point(207,72))
hairline9 = Line(Point(207,72),Point(235,53))
hairline10 = Line(Point(137,230),Point(158,215))
hairline11 = Line(Point(127,95),Point(141,140))
hairline12 = Line(Point(180,70),Point(174,104))
hairline13 = Line(Point(22,252),Point(94,225))
hairline14 = Line(Point(202,160),Point(254,113))
hairline15 = Line(Point(173,125),Point(210,79))
hairline16 = Line(Point(175,217),Point(171,205))
hairline17 = Line(Point(171,205),Point(165,208))
hairline18 = Line(Point(305,96),Point(332,64))
hairline19 = Line(Point(275,139),Point(315,94))
hairline20 = Line(Point(98,112),Point(91,174))
hairline21 = Line(Point(91,174),Point(99,208))
hairline22 = Line(Point(128,214),Point(156,201))
hairline23 = Line(Point(132,113),Point(163,50))
hairline24 = Line(Point(185,92),Point(240,32))
hairline25 = Line(Point(271,245),Point(295,233))
hairline26 = Line(Point(295,233),Point(322,209))
hairline27 = Line(Point(227,190),Point(286,139))
hairline28 = Line(Point(302,183),Point(326,164))
neck.draw(win)
head.draw(win)
headdark1.draw(win)
headdark2.draw(win)
headdark3.draw(win)
headline1.draw(win)
headline2.draw(win)
headline3.draw(win)
headline4.draw(win)
headline5.draw(win)
neckline1.draw(win)
neckline2.draw(win)
neckline3.draw(win)
neckline4.draw(win)
neckline5.draw(win)
throat.draw(win)
innerear.draw(win)
earline1.draw(win)
earline2.draw(win)
earline3.draw(win)
earline4.draw(win)
earline5.draw(win)
chin.draw(win)
mouthline1.draw(win)
mouthline2.draw(win)
mouthline3.draw(win)
noseline1.draw(win)
noseline2.draw(win)
noseline3.draw(win)
lefteye.draw(win)
righteye.draw(win)
leftiris.draw(win)
rightiris.draw(win)
lefteyebrow.draw(win)
righteyebrow.draw(win)
hairbg.draw(win)
hairdark1.draw(win)
hairdark2.draw(win)
hairdark3.draw(win)
hairdark4.draw(win)
hairdark5.draw(win)
hairdark6.draw(win)
hairdark7.draw(win)
hairdark8.draw(win)
hairdark9.draw(win)
hairdark10.draw(win)
hairdark11.draw(win)
hairdark12.draw(win)
hairdark13.draw(win)
hairdark14.draw(win)
hairdark15.draw(win)
hairdark16.draw(win)
hairdark17.draw(win)
hairline1.draw(win)
hairline2.draw(win)
hairline3.draw(win)
hairline4.draw(win)
hairline5.draw(win)
hairline6.draw(win)
hairline7.draw(win)
hairline8.draw(win)
hairline9.draw(win)
hairline10.draw(win)
hairline11.draw(win)
hairline12.draw(win)
hairline13.draw(win)
hairline14.draw(win)
hairline15.draw(win)
hairline16.draw(win)
hairline17.draw(win)
hairline18.draw(win)
hairline19.draw(win)
hairline20.draw(win)
hairline21.draw(win)
hairline22.draw(win)
hairline23.draw(win)
hairline24.draw(win)
hairline25.draw(win)
hairline26.draw(win)
hairline27.draw(win)
hairline28.draw(win)
win.getMouse()
main()