绘画过程可以在下列平台查看:
抖音:用代码画出小灰灰
b站:用代码画出小灰灰_哔哩哔哩_bilibili
# coding=gbk
import turtle
def plotLine(points, pencolor=None, width=None, speed=None):
'''
功能:画折线
参数:
- points : 一系列点,用列表或元组表示
- pencolor : 画笔颜色,默认不变
- width : 画笔宽度,默认不变
- speed : 绘制速度,默认不变
'''
# 记录旧参数
oldpencolor = turtle.pencolor()
oldwidth = turtle.width()
oldspeed = turtle.speed()
# 修改新参数
if pencolor is not None:
turtle.pencolor(pencolor)
if width is not None:
turtle.width(width)
if speed is not None:
turtle.speed(speed)
# 绘制折线
turtle.up()
turtle.goto(points[0])
turtle.down()
for point in points[1:]:
turtle.goto(point)
# 恢复旧参数
turtle.pencolor(oldpencolor)
turtle.width(oldwidth)
turtle.speed(oldspeed)
def plotPoly(points, fill=False, pencolor=None, fillcolor=None,
width=None, speed=None):
'''
功能:绘制封闭多边形
'''
# 保存旧参数
oldfillcolor = turtle.fillcolor()
# 更新新参数
if fillcolor is not None:
turtle.fillcolor(fillcolor)
# 绘制封闭多边形
points_plotline = list(points) + [points[0]]
if fill:
turtle.begin_fill()
plotLine(points_plotline, pencolor, width, speed)
turtle.end_fill()
else:
plotLine(points_plotline, pencolor, width, speed)
# 恢复旧参数
turtle.fillcolor(oldfillcolor)
# 设置一些参数
turtle.setup(600, 750, 100, 30)
turtle.speed(10)
turtle.shape('turtle')
turtle.turtlesize(2, 2, 2)
# 绘画
# 轮廓
points = [
(-155, 307), (-162, 310), (-175, 315), (-187, 319), (-198, 321),
(-205, 321), (-209, 320), (-209, 316), (-206, 313), (-203, 311),
(-202, 310), (-204, 311), (-207, 314), (-211, 315), (-219, 317),
(-232, 317), (-237, 315), (-241, 312), (-248, 307), (-252, 300),
(-257, 293), (-261, 286), (-266, 277), (-269, 271), (-272, 265),
(-276, 260), (-280, 254), (-284, 249), (-288, 242), (-290, 237),
(-292, 231), (-294, 225), (-295, 220), (-295, 213), (-295, 207),
(-293, 201), (-290, 195), (-288, 191), (-284, 185), (-280, 182),
(-277, 180), (-273, 178), (-267, 178), (-261, 180), (-257, 183),
(-254, 186), (-250, 189), (-248, 184), (-246, 177), (-243, 170),
(-240, 163), (-237, 157), (-234, 151), (-230, 146), (-230, 139),
(-230, 129), (-230, 114), (-230, 99), (-230, 91), (-235, 88),
(-239, 84), (-242, 81), (-247, 77), (-252, 72), (-258, 64),
(-263, 56), (-268, 49), (-272, 41), (-276, 31), (-280, 19),
(-283, 10), (-285, 3), (-285, -4), (-285, -8), (-284, -11),
(-281, -13), (-273, -14), (-267, -14), (-263, -16), (-260, -19),
(-260, -26), (-261, -29), (-261, -35), (-259, -39), (-256, -41),
(-250, -43), (-242, -47), (-234, -51), (-228, -54), (-222, -56),
(-221, -61), (-219, -69), (-216, -76), (-211, -86), (-206, -94),
(-201, -100), (-194, -107), (-189, -112), (-182, -118), (-173, -123),
(-165, -127), (-157, -130), (-149, -134), (-138, -137), (-127, -140),
(-116, -142), (-107, -144), (-98, -145), (-98, -147), (-101, -151),
(-104, -156), (-107, -162), (-111, -168), (-115, -176), (-117, -183),
(-119, -189), (-120, -194), (-121, -198), (-125, -201), (-130, -206),
(-132, -208), (-134, -214), (-136, -222), (-136, -231), (-134, -239),
(-132, -246), (-129, -252), (-126, -256), (-121, -255), (-117, -254),
(-116, -256), (-112, -257), (-109, -256), (-107, -253), (-105, -254),
(-102, -254), (-100, -251), (-99, -249), (-99, -245), (-99, -239),
(-99, -234), (-98, -230), (-95, -236), (-93, -243), (-89, -248),
(-83, -257), (-78, -262), (-70, -268), (-64, -271), (-61, -271),
(-62, -279), (-60, -284), (-60, -288), (-57, -291), (-60, -288),
(-68, -288), (-76, -288), (-84, -290), (-92, -293), (-98, -296),
(-104, -300), (-108, -304), (-111, -308), (-114, -314), (-114, -323),
(-112, -328), (-109, -332), (-104, -334), (-100, -336), (-96, -338),
(-87, -339), (-78, -340), (-69, -340), (-60, -340), (-52, -340),
(-46, -339), (-37, -337), (-28, -333), (-23, -329), (-19, -324),
(-17, -318), (-17, -312), (-17, -307), (-20, -303), (-25, -299),
(-29, -296), (-34, -294), (-37, -288), (-38, -282), (-31, -283),
(-18, -285), (-5, -285), (7, -285), (16, -284), (26, -282),
(34, -281), (34, -289), (30, -292), (23, -297), (19, -302),
(15, -309), (13, -316), (12, -322), (12, -328), (13, -334),
(17, -339), (20, -342), (27, -345), (35, -347), (43, -348),
(53, -349), (63, -349), (72, -349), (80, -347), (89, -343),
(93, -339), (95, -333), (95, -325), (93, -319), (91, -311),
(86, -304), (81, -298), (75, -294), (71, -291), (70, -289),
(75, -289), (83, -292), (91, -293), (99, -292), (101, -290),
(103, -289), (100, -285), (98, -283), (97, -280), (101, -280),
(104, -281), (107, -282), (112, -282), (114, -281), (117, -279),
(115, -276), (113, -274), (118, -273), (122, -273), (127, -271),
(129, -269), (131, -267), (125, -266), (120, -266), (118, -266),
(116, -264), (121, -263), (127, -261), (134, -257), (139, -250),
(143, -245), (144, -239), (143, -235), (140, -233), (139, -232),
(139, -224), (137, -218), (134, -210), (130, -206), (128, -203),
(127, -202), (123, -199), (118, -199), (117, -195), (116, -190),
(115, -184), (113, -179), (110, -171), (105, -163), (101, -157),
(98, -151), (93, -145), (89, -140), (85, -136), (83, -133),
(90, -131), (101, -127), (113, -121), (128, -114), (140, -106),
(151, -98), (161, -90), (170, -81), (177, -73), (182, -66),
(185, -61), (188, -59), (198, -55), (209, -52), (218, -48),
(228, -46), (237, -45), (240, -43), (243, -41), (243, -35),
(243, -30), (246, -25), (249, -23), (256, -23), (263, -23),
(268, -22), (271, -20), (274, -17), (275, -11), (275, -2),
(274, 5), (272, 15), (270, 23), (268, 29), (264, 42),
(259, 53), (254, 62), (249, 70), (245, 77), (239, 84),
(234, 90), (229, 95), (224, 100), (220, 103), (216, 106),
(216, 113), (216, 120), (220, 125), (226, 134), (230, 143),
(234, 153), (237, 161), (239, 166), (241, 171), (243, 176),
(243, 181), (248, 175), (254, 172), (259, 169), (263, 168),
(269, 169), (275, 173), (279, 179), (282, 187), (286, 196),
(288, 203), (290, 210), (290, 216), (290, 227), (286, 237),
(282, 247), (276, 257), (272, 264), (269, 269), (258, 286),
(246, 308), (238, 318), (230, 326), (224, 329), (217, 331),
(196, 332), (187, 330), (180, 330), (175, 329), (178, 332),
(180, 336), (180, 337), (177, 337), (167, 337), (159, 335),
(149, 333), (138, 330), (124, 326), (111, 321), (99, 317),
(89, 312), (77, 306), (69, 312), (62, 318), (57, 321),
(46, 323), (57, 322), (63, 324), (67, 327), (68, 330),
(68, 332), (65, 336), (56, 341), (43, 345), (33, 347),
(18, 347), (5, 346), (1, 345), (-4, 344), (-9, 343),
(-11, 342), (-6, 344), (-1, 347), (2, 351), (4, 352),
(3, 356), (-10, 357), (-24, 358), (-39, 358), (-51, 356),
(-60, 353), (-70, 348), (-77, 344), (-80, 340), (-83, 338),
(-79, 343), (-80, 349), (-83, 354), (-87, 357), (-91, 358),
(-96, 357), (-100, 355), (-102, 351), (-103, 347), (-103, 343),
(-102, 336), (-100, 332), (-100, 331), (-101, 332), (-108, 334),
(-115, 335), (-124, 334), (-128, 333), (-131, 331), (-131, 326),
(-128, 324), (-125, 322), (-117, 322), (-125, 321), (-131, 319),
(-137, 317), (-143, 314), (-149, 310),
]
plotPoly(points, True, pencolor=(0.28, 0.29, 0.21),
fillcolor=(0.47, 0.47, 0.47), width=2)
# 发型
points = [
(-100, 331), (-100, 333), (-102, 337), (-103, 344), (-102, 348),
(-101, 353), (-98, 356), (-93, 357), (-87, 357), (-83, 354),
(-80, 350), (-79, 348), (-79, 344), (-79, 341), (-82, 339),
(-84, 337), (-80, 340), (-76, 343), (-71, 347), (-65, 351),
(-56, 354), (-47, 356), (-37, 358), (-26, 358), (-16, 358),
(-7, 357), (0, 355), (4, 355), (4, 352), (0, 349),
(-4, 346), (-7, 344), (-11, 343), (-5, 344), (0, 345),
(9, 346), (22, 347), (33, 346), (44, 344), (55, 340),
(64, 337), (67, 333), (68, 329), (67, 326), (63, 325),
(60, 323), (56, 322), (52, 322), (46, 322), (52, 322),
(57, 321), (61, 319), (65, 316), (68, 313), (72, 310),
(75, 306), (77, 302), (80, 298), (82, 293), (83, 289),
(83, 273), (82, 269), (81, 265), (79, 264), (76, 264),
(73, 267), (69, 271), (67, 274), (64, 278), (63, 279),
(66, 274), (69, 269), (73, 266), (72, 260), (70, 251),
(65, 240), (59, 229), (50, 218), (41, 211), (33, 205),
(25, 202), (15, 198), (20, 203), (26, 210), (30, 217),
(32, 223), (33, 228), (31, 222), (27, 216), (22, 213),
(15, 209), (1, 204), (-10, 200), (-18, 196), (-26, 191),
(-32, 186), (-38, 180), (-42, 177), (-43, 184), (-41, 190),
(-38, 195), (-35, 199), (-42, 192), (-47, 189), (-53, 185),
(-64, 179), (-74, 172), (-81, 166), (-87, 161), (-90, 157),
(-102, 161), (-110, 168), (-119, 175), (-125, 183), (-132, 191),
(-135, 201), (-135, 214), (-135, 200), (-132, 192), (-136, 188),
(-137, 184), (-140, 184), (-149, 191), (-160, 202), (-164, 212),
(-165, 220), (-166, 229), (-165, 236), (-161, 245), (-165, 235),
(-169, 231), (-174, 226), (-177, 225), (-180, 227), (-185, 235),
(-188, 240), (-188, 247), (-187, 257), (-185, 264), (-183, 270),
(-179, 280), (-174, 288), (-168, 294), (-161, 301), (-152, 308),
(-144, 313), (-136, 316), (-128, 319), (-125, 321), (-117, 321),
(-125, 321), (-127, 323), (-131, 324), (-131, 327), (-130, 331),
(-127, 333), (-121, 334), (-116, 334), (-109, 334), (-104, 332),
(-100, 331), (-101, 332),
]
plotPoly(points, True, pencolor=(0.2, 0.24, 0.19),
fillcolor=(0.59, 0.59, 0.61), width=2)
points = [
(-128, 256), (-128, 266), (-126, 275), (-122, 281), (-117, 287),
(-112, 292), (-109, 294), (-113, 297), (-117, 298), (-118, 302),
(-114, 305), (-107, 308), (-97, 310), (-88, 311), (-77, 312),
(-69, 314), (-69, 317), (-76, 316), (-71, 319), (-62, 321),
(-55, 321), (-47, 320), (-39, 317), (-32, 319), (-28, 322),
(-23, 323), (-19, 321), (-17, 315), (-14, 312), (-9, 312),
(-5, 309), (-4, 305), (-5, 299), (-4, 294), (-3, 288),
(-1, 283), (-7, 285), (-11, 284), (-13, 276), (-14, 271),
(-19, 265), (-22, 261), (-26, 257), (-32, 259), (-38, 261),
(-44, 260), (-48, 254), (-51, 249), (-55, 246), (-63, 247),
(-68, 248), (-74, 244), (-78, 237), (-81, 233), (-84, 227),
(-88, 227), (-93, 227), (-101, 231), (-104, 237), (-108, 243),
(-110, 253), (-110, 256), (-119, 256),
]
plotPoly(points, True, pencolor=(0.64, 0.64, 0.66),
fillcolor=(0.64, 0.64, 0.66), width=2)
# 发型阴影
points = [
(-187, 237), (-189, 235), (-190, 233), (-188, 230), (-186, 227),
(-184, 223), (-182, 221), (-180, 219), (-177, 220), (-174, 221),
(-173, 223), (-170, 223), (-170, 220), (-170, 216), (-170, 215),
(-169, 211), (-168, 207), (-166, 202), (-164, 197), (-163, 194),
(-160, 191), (-156, 187), (-152, 184), (-148, 180), (-146, 178),
(-143, 176), (-139, 174), (-136, 176), (-134, 178), (-133, 182),
(-132, 183), (-130, 181), (-128, 178), (-125, 173), (-121, 168),
(-118, 164), (-115, 161), (-109, 156), (-106, 152), (-102, 150),
(-98, 147), (-93, 144), (-91, 143), (-88, 147), (-86, 151),
(-83, 153), (-78, 159), (-73, 164), (-68, 169), (-63, 172),
(-60, 175), (-56, 177), (-52, 179), (-47, 182), (-45, 184),
(-44, 180), (-44, 177), (-42, 176), (-39, 177), (-36, 179),
(-32, 183), (-27, 187), (-22, 189), (-17, 192), (-9, 195),
(-2, 197), (4, 199), (9, 202), (16, 205), (21, 207),
(16, 202), (12, 197), (14, 196), (18, 197), (25, 199),
(33, 202), (41, 206), (47, 212), (49, 215), (43, 211),
(39, 208), (34, 205), (29, 203), (24, 201), (15, 200),
(19, 204), (22, 208), (23, 210), (23, 211), (20, 209),
(10, 205), (3, 203), (-3, 201), (-10, 198), (-18, 194),
(-24, 190), (-29, 187), (-33, 184), (-36, 182), (-39, 181),
(-43, 182), (-43, 184), (-42, 188), (-42, 189), (-51, 184),
(-60, 178), (-69, 172), (-77, 166), (-83, 161), (-86, 156),
(-89, 153), (-96, 155), (-102, 159), (-108, 163), (-116, 170),
(-121, 176), (-125, 181), (-128, 185), (-131, 188), (-133, 188),
(-135, 185), (-136, 183), (-137, 180), (-143, 183), (-149, 189),
(-154, 192), (-159, 197), (-162, 203), (-165, 210), (-167, 217),
(-168, 222), (-167, 227), (-167, 230), (-171, 228), (-174, 225),
(-177, 223), (-179, 224), (-182, 227), (-185, 231), (-186, 234),
]
plotPoly(points, True, pencolor=(0.33, 0.33, 0.35),
fillcolor=(0.36, 0.35, 0.38), width=2)
# 右耳
points = [
(-250, 190), (-244, 197), (-238, 206), (-233, 213), (-229, 221),
(-226, 230), (-224, 239), (-222, 248), (-223, 260), (-224, 267),
(-220, 266), (-216, 260), (-211, 251), (-206, 241), (-202, 233),
(-200, 224), (-204, 218), (-207, 211), (-212, 203), (-216, 193),
(-219, 187), (-222, 177), (-226, 167), (-227, 163), (-228, 156),
(-230, 147), (-235, 152), (-238, 160), (-242, 167), (-246, 176),
(-248, 184),
]
plotPoly(points, True, pencolor=(0.2, 0.24, 0.05),
fillcolor=(0.59, 0.59, 0.59), width=2)
points = [
(-207, 299), (-213, 301), (-219, 301), (-223, 299), (-225, 292),
(-225, 286), (-225, 279), (-224, 274), (-224, 269), (-223, 263),
]
plotLine(points, pencolor=(0.22, 0.22, 0.22), width=2)
points = [
(-188, 239), (-191, 236), (-193, 233), (-197, 227), (-200, 223),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
# 右耳阴影
'''
points = [
(-248, 189), (-246, 184), (-245, 182), (-240, 185), (-235, 190),
(-231, 197), (-228, 204), (-224, 213), (-221, 222), (-219, 231),
(-219, 237), (-217, 240), (-215, 240), (-213, 236), (-211, 230),
(-208, 225), (-205, 221), (-204, 220), (-201, 224), (-204, 230),
(-206, 237), (-209, 242), (-211, 249), (-214, 254), (-217, 259),
(-219, 262), (-220, 263), (-221, 262), (-221, 258), (-221, 250),
(-221, 243), (-222, 238), (-224, 231), (-226, 223), (-228, 218),
(-231, 211), (-235, 205), (-238, 200), (-240, 197), (-243, 194),
(-245, 192),
]
plotPoly(points, True, pencolor=(0.42, 0.42, 0.42),
fillcolor=(0.42, 0.42, 0.42), width=2)
'''
points = [
(-294, 213), (-294, 206), (-292, 200), (-289, 194), (-285, 189),
(-282, 186), (-279, 183), (-277, 181), (-273, 180), (-269, 180),
(-266, 180), (-262, 182), (-258, 184), (-254, 188), (-250, 192),
(-246, 196), (-243, 199), (-240, 204), (-235, 212), (-231, 219),
(-229, 226), (-226, 232), (-225, 241), (-225, 252), (-225, 262),
(-226, 273), (-226, 283), (-226, 291), (-228, 293), (-228, 284),
(-229, 271), (-230, 252), (-232, 242), (-234, 234), (-237, 226),
(-241, 219), (-248, 212), (-256, 206), (-263, 202), (-271, 198),
(-276, 196), (-286, 197), (-289, 202), (-291, 206),
]
plotPoly(points, True, pencolor=(0.36, 0.36, 0.36),
fillcolor=(0.36, 0.36, 0.36), width=2)
# 左耳
points = [
(211, 272), (199, 266), (189, 259), (177, 250), (166, 241),
(159, 232), (150, 223), (144, 215), (140, 208), (136, 203),
(147, 203), (157, 204), (164, 204), (167, 203), (169, 199),
(167, 196), (164, 192), (161, 189), (159, 186), (159, 184),
(158, 180), (158, 178), (163, 178), (173, 178), (182, 178),
(189, 178), (193, 176), (195, 174), (195, 170), (193, 167),
(191, 163), (188, 159), (186, 156), (186, 154), (191, 154),
(196, 154), (200, 153), (202, 151), (201, 147), (199, 145),
(198, 143), (197, 141), (199, 140), (202, 141), (208, 143),
(215, 145), (219, 146), (222, 146), (223, 145), (222, 140),
(220, 135), (219, 131), (217, 128), (216, 124), (217, 122),
(219, 123), (222, 128), (226, 135), (230, 143), (233, 152),
(238, 162), (240, 170), (243, 177), (243, 181), (235, 190),
(229, 197), (226, 205), (222, 213), (217, 224), (214, 234),
(212, 245), (212, 255), (212, 264),
]
plotPoly(points, True, pencolor=(0.18, 0.18, 0.18),
fillcolor=(0.67, 0.67, 0.67), width=2)
points = [
(198, 305), (205, 305), (207, 304), (210, 301),
(211, 296), (212, 291), (213, 286), (213, 281), (213, 276),
(212, 271),
]
plotLine(points, pencolor=(0.18, 0.18, 0.18), width=2)
# 脸部线条
points = [
(-230, 93), (-230, 86), (-229, 77), (-229, 65), (-228, 54),
(-226, 40), (-224, 28), (-223, 20), (-221, 10), (-220, 5),
(-219, -1), (-218, -9), (-220, -16), (-221, -22), (-222, -30),
(-223, -39), (-223, -45), (-223, -51), (-222, -57), (-221, -62),
]
plotLine(points, pencolor=(0.35, 0.21, 0.24), width=2)
# 右眉
points = [
(-195, 124), (-195, 129), (-193, 136), (-193, 141), (-190, 144),
(-187, 147), (-183, 150), (-178, 152), (-173, 154), (-168, 156),
(-162, 156), (-156, 156), (-149, 155), (-144, 153), (-140, 149),
(-136, 146), (-133, 142), (-131, 139), (-128, 133), (-126, 127),
(-127, 124), (-129, 121), (-130, 120), (-132, 120), (-135, 124),
(-139, 128), (-146, 133), (-152, 136), (-157, 138), (-166, 137),
(-174, 136), (-180, 133), (-185, 131), (-190, 128),
]
plotPoly(points, True, pencolor=(0.15, 0.15, 0.15),
fillcolor=(0.14, 0.11, 0.16), width=2)
# 左眉
points = [
(-25, 123), (-27, 126), (-28, 128), (-28, 133), (-26, 137),
(-22, 142), (-17, 147), (-11, 152), (-6, 155), (1, 158),
(7, 160), (14, 161), (23, 161), (31, 160), (38, 159),
(45, 155), (51, 152), (57, 148), (60, 144), (63, 140),
(62, 133), (62, 126), (62, 122), (58, 126), (51, 131),
(41, 134), (37, 136), (29, 138), (21, 139), (12, 139),
(3, 138), (-3, 135), (-11, 132), (-16, 129), (-20, 126),
]
plotPoly(points, True, pencolor=(0.25, 0.25, 0.27),
fillcolor=(0.15, 0.11, 0.16), width=2)
# 右眼
points = [
(-193, 63), (-199, 57), (-204, 52), (-208, 46), (-212, 39),
(-214, 32), (-216, 26), (-217, 19), (-218, 11), (-218, 4),
(-218, -1), (-217, -6), (-216, -13), (-214, -19), (-211, -25),
(-208, -31), (-204, -36), (-199, -42), (-194, -47), (-188, -51),
(-183, -53), (-177, -56), (-169, -56), (-160, -56), (-153, -54),
(-146, -51), (-140, -46), (-132, -39), (-128, -33), (-125, -27),
(-122, -21), (-120, -16), (-119, -12), (-118, -8), (-118, -2),
(-117, 4), (-117, 12), (-118, 20), (-120, 29), (-123, 37),
(-126, 44), (-130, 50), (-134, 55), (-138, 59), (-145, 65),
(-153, 69), (-160, 70), (-169, 71), (-176, 70), (-182, 69),
(-188, 66),
]
plotPoly(points, True, pencolor=(0.33, 0.33, 0.33),
fillcolor=(1.0, 1.0, 1.0), width=2)
points = [
(-205, 35), (-209, 28), (-211, 22), (-213, 16), (-214, 8),
(-214, 0), (-213, -10), (-211, -17), (-209, -21), (-206, -26),
(-203, -30), (-199, -34), (-193, -38), (-188, -41), (-184, -42),
(-178, -43), (-171, -43), (-163, -41), (-157, -38), (-150, -32),
(-142, -22), (-139, -15), (-137, -5), (-136, 3), (-137, 17),
(-139, 24), (-142, 31), (-148, 39), (-156, 45), (-162, 48),
(-170, 49), (-179, 49), (-186, 48), (-191, 46), (-196, 42),
(-201, 39), (-204, 36),
]
plotPoly(points, True, pencolor=(1.0, 1.0, 1.0),
fillcolor=(0.44, 0.55, 0.6), width=2)
points = [
(-168, 34), (-164, 33), (-158, 29), (-155, 24), (-152, 20),
(-149, 15), (-149, 9), (-149, 4), (-149, 0), (-157, -19),
(-161, -22), (-165, -24), (-169, -26), (-173, -27), (-179, -27),
(-186, -25), (-190, -23), (-195, -19), (-197, -15), (-200, -11),
(-202, -5), (-202, 0), (-199, 9), (-196, 16), (-191, 24),
(-187, 29), (-181, 32), (-175, 34), (-171, 34),
]
plotPoly(points, True, pencolor=(0.0, 0.0, 0.0),
fillcolor=(0.0, 0.0, 0.0), width=2)
points = [
(-199, 38), (-203, 35), (-206, 31), (-208, 24), (-209, 17),
(-208, 11), (-206, 6), (-203, 2), (-199, 0), (-196, -3),
(-191, -3), (-185, -2), (-180, 0), (-175, 5), (-172, 10),
(-171, 15), (-171, 20), (-171, 25), (-173, 30), (-175, 34),
(-177, 36), (-181, 39), (-185, 40), (-190, 41), (-195, 39),
]
plotPoly(points, True, pencolor=(1, 1, 1),
fillcolor=(1.0, 1.0, 1.0), width=2)
points = [
(-149, 0), (-153, -1), (-155, -2), (-157, -5), (-158, -8),
(-158, -12), (-157, -17), (-156, -19), (-153, -21), (-151, -22),
(-148, -22), (-145, -21), (-142, -18), (-141, -15), (-140, -12),
(-141, -7), (-142, -4), (-145, -1), (-148, 0),
]
plotPoly(points, True, pencolor=(0.67, 0.66, 0.71),
fillcolor=(0.67, 0.66, 0.71), width=2)
turtle.up()
turtle.goto((-170, -31))
turtle.down()
turtle.pencolor((0.43, 0.42, 0.47))
turtle.dot(15)
# 左眼
points = [
(-6, 71), (-13, 67), (-20, 64), (-26, 58), (-33, 52),
(-39, 45), (-44, 38), (-47, 31), (-49, 25), (-51, 19),
(-51, 14), (-52, 8), (-52, 0), (-51, -5), (-49, -13),
(-47, -19), (-44, -26), (-40, -31), (-36, -36), (-32, -41),
(-28, -45), (-23, -49), (-19, -52), (-13, -55), (-7, -58),
(-2, -60), (3, -60), (11, -60), (18, -61), (26, -60),
(34, -60), (39, -57), (45, -56), (52, -51), (57, -48),
(64, -41), (70, -36), (75, -28), (79, -22), (81, -16),
(83, -11), (84, -4), (84, 2), (84, 10), (84, 17),
(83, 24), (80, 31), (78, 37), (75, 42), (71, 48),
(67, 52), (61, 58), (55, 63), (48, 66), (43, 68),
(38, 71), (30, 72), (26, 72), (16, 73), (9, 73),
(3, 72), (-2, 72), (-5, 71),
]
plotPoly(points, True, pencolor=(0.32, 0.32, 0.32),
fillcolor=(1.0, 1.0, 1.0), width=2)
points = [
(-34, 39), (-39, 33), (-44, 22), (-46, 15), (-46, 3),
(-46, -7), (-42, -16), (-40, -21), (-34, -28), (-28, -34),
(-22, -38), (-15, -41), (-7, -45), (2, -46), (13, -45),
(23, -43), (31, -39), (41, -32), (48, -24), (54, -16),
(56, -5), (57, 4), (56, 14), (54, 23), (49, 32),
(44, 38), (38, 44), (33, 47), (25, 52), (20, 55),
(11, 56), (-2, 55), (-14, 53), (-22, 49), (-31, 43),
]
plotPoly(points, True, pencolor=(0.99, 0.99, 0.99),
fillcolor=(0.42, 0.52, 0.6), width=2)
points = [
(5, 39), (11, 39), (18, 38), (24, 34), (30, 30),
(35, 24), (39, 17), (40, 11), (41, 5), (41, 2),
(40, -5), (38, -10), (35, -16), (31, -20), (27, -22),
(23, -25), (18, -27), (13, -29), (8, -30), (3, -30),
(-3, -30), (-9, -28), (-17, -23), (-24, -17), (-28, -11),
(-29, -5), (-29, 3), (-27, 12), (-22, 22), (-15, 31),
(-7, 36),
]
plotPoly(points, True, pencolor=(0.0, 0.0, 0.0),
fillcolor=(0.0, 0.0, 0.0), width=2)
points = [
(-15, 45), (-22, 44), (-30, 40), (-35, 35), (-39, 29),
(-40, 20), (-38, 13), (-36, 7), (-31, 3), (-26, 0),
(-20, -3), (-11, -3), (-3, 0), (3, 4), (8, 8),
(10, 14), (12, 20), (11, 27), (9, 32), (5, 38),
(0, 42), (-7, 44),
]
plotPoly(points, True, pencolor=(0.99, 0.99, 0.99),
fillcolor=(0.99, 0.99, 0.99), width=2)
points = [
(33, 0), (39, 1), (44, 1), (48, -1), (51, -5),
(52, -9), (52, -14), (50, -18), (48, -20), (45, -23),
(41, -23), (35, -23), (32, -21), (29, -17), (27, -13),
(27, -9), (29, -4),
]
plotPoly(points, True, pencolor=(0.66, 0.66, 0.68),
fillcolor=(0.66, 0.66, 0.68), width=2)
turtle.up()
turtle.goto((11, -34))
turtle.down()
turtle.pencolor((0.43, 0.42, 0.46))
turtle.dot(15)
# 鼻子
points = [
(-108, -30), (-115, -32), (-120, -33), (-123, -35), (-127, -38),
(-129, -41), (-131, -45), (-131, -49), (-131, -54), (-130, -58),
(-127, -61), (-124, -63), (-121, -65), (-116, -67), (-110, -69),
(-103, -69), (-96, -69), (-91, -67), (-85, -65), (-80, -62),
(-76, -58), (-74, -54), (-74, -50), (-75, -45), (-78, -40),
(-81, -37), (-85, -34), (-90, -32), (-94, -31), (-100, -30),
]
plotPoly(points, True, pencolor=(0.0, 0.0, 0.0),
fillcolor=(0.0, 0.0, 0.0), width=2)
points = [
(-125, -38), (-127, -40), (-127, -43), (-126, -47), (-124, -49),
(-122, -50), (-120, -50), (-117, -50), (-114, -48), (-112, -46),
(-112, -43), (-112, -41), (-114, -39), (-116, -38), (-119, -37),
(-123, -37),
]
plotPoly(points, True, pencolor=(1.0, 1.0, 1.0),
fillcolor=(1.0, 1.0, 1.0), width=2)
# 嘴巴
points = [
(-111, -83), (-110, -92), (-109, -98), (-107, -106), (-102, -115),
(-98, -123), (-90, -130), (-81, -136), (-73, -139), (-66, -141),
(-57, -142), (-49, -141), (-40, -137), (-33, -131), (-30, -125),
(-28, -117), (-28, -108), (-28, -100), (-29, -92), (-32, -83),
(-35, -75), (-36, -73), (-40, -68), (-44, -71), (-52, -74),
(-61, -77), (-69, -79), (-78, -81), (-86, -82), (-96, -83),
(-104, -83),
]
plotPoly(points, True, pencolor=(0.1, 0.1, 0.1),
fillcolor=(0.62, 0.25, 0.25), width=2)
points = [
(-110, -85), (-110, -87), (-109, -88), (-106, -88), (-95, -88),
(-86, -88), (-77, -88), (-70, -87), (-65, -86), (-59, -84),
(-52, -82), (-49, -81), (-45, -81), (-44, -82), (-42, -83),
(-40, -83), (-38, -82), (-36, -81), (-35, -80), (-36, -78),
(-37, -76), (-38, -74), (-39, -73), (-40, -72), (-42, -73),
(-47, -75), (-52, -76), (-56, -77), (-59, -78), (-64, -80),
(-69, -81), (-75, -82), (-80, -83), (-86, -84), (-92, -84),
(-99, -84), (-105, -84), (-109, -84),
]
plotPoly(points, True, pencolor=(0.99, 0.99, 0.99),
fillcolor=(0.99, 0.99, 0.99), width=2)
points = [
(-29, -98), (-29, -108), (-29, -117), (-31, -123), (-33, -128),
(-36, -132), (-39, -135), (-43, -138), (-48, -140), (-53, -141),
(-57, -141), (-62, -141), (-64, -141), (-64, -138), (-64, -132),
(-64, -126), (-63, -121), (-62, -117), (-59, -111), (-56, -107),
(-50, -104), (-44, -101), (-38, -99), (-33, -98),
]
plotPoly(points, True, pencolor=(0.92, 0.47, 0.47),
fillcolor=(0.92, 0.47, 0.47), width=2)
# 红晕
points = [
(73, -68), (62, -72), (58, -78), (62, -84), (68, -87),
(77, -88), (88, -87), (97, -84), (99, -79), (98, -71),
(90, -68), (80, -68),
]
plotPoly(points, True, pencolor=(0.67, 0.5, 0.52),
fillcolor=(0.67, 0.5, 0.52), width=2)
points = [
(-217, -65), (-214, -74), (-211, -82), (-208, -85), (-203, -82),
(-196, -79), (-190, -77), (-189, -72), (-196, -68), (-205, -66),
(-212, -66),
]
plotPoly(points, True, pencolor=(0.65, 0.51, 0.51),
fillcolor=(0.65, 0.51, 0.51), width=2)
# 脸部曲线(下巴)
points = [
(-100, -145), (-91, -146), (-80, -147), (-65, -148), (-53, -148),
(-42, -148), (-29, -148), (-17, -148), (-5, -148), (7, -146),
(17, -145), (29, -144), (39, -143), (50, -142), (61, -139),
(70, -137), (79, -135), (87, -131), (83, -133),
]
plotLine(points, pencolor=(0.25, 0.25, 0.25), width=2)
# 胸口
points = [
(-58, -161), (-54, -158), (-50, -154), (-46, -151), (-43, -150),
(-38, -150), (-27, -150), (-18, -150), (-9, -150), (1, -149),
(7, -149), (12, -151), (14, -152), (17, -156), (19, -160),
(19, -166), (-60, -166),
]
plotPoly(points, True, pencolor=(0.64, 0.64, 0.62),
fillcolor=(0.64, 0.64, 0.62), width=2)
# 衣服
points = [
(-92, -183), (-91, -190), (-93, -195), (-95, -199), (-97, -203),
(-102, -206), (-102, -215), (-101, -223), (-98, -229), (-96, -236),
(-93, -242), (-90, -248), (-86, -254), (-80, -261), (-75, -265),
(-68, -270), (-62, -272), (-53, -277), (-46, -280), (-39, -281),
(-30, -283), (-17, -285), (-5, -285), (5, -285), (17, -284),
(27, -283), (34, -281), (41, -279), (49, -276), (56, -273),
(62, -269), (68, -265), (74, -260), (78, -254), (82, -250),
(84, -247), (80, -246), (78, -245), (77, -240), (77, -237),
(80, -232), (81, -227), (82, -222), (83, -218), (84, -213),
(87, -210), (89, -207), (88, -204), (82, -201), (75, -199),
(68, -193), (64, -189), (59, -182), (54, -173), (51, -167),
(49, -161), (48, -159), (42, -160), (28, -161), (13, -162),
(-11, -162), (-40, -162), (-60, -162), (-70, -161), (-82, -162),
(-88, -162), (-89, -168), (-89, -176), (-90, -182), (-91, -186),
]
plotPoly(points, True, pencolor=(0.21, 0.16, 0.27),
fillcolor=(0.06, 0.47, 0.64), width=2)
# 右肩带
points = [
(-91, -147), (-92, -154), (-93, -162), (-93, -169), (-93, -175),
(-93, -179), (-89, -182), (-84, -184), (-78, -184), (-74, -182),
(-70, -179), (-70, -176), (-70, -169), (-70, -160), (-70, -153),
(-69, -148), (-74, -148), (-82, -147), (-86, -147),
]
plotPoly(points, True, pencolor=(0.27, 0.32, 0.37),
fillcolor=(0.22, 0.33, 0.51), width=2)
# 左肩带
points = [
(18, -146), (18, -154), (18, -162), (18, -169), (20, -177),
(22, -181), (26, -184), (30, -185), (35, -184), (39, -182),
(43, -179), (46, -176), (46, -167), (46, -158), (46, -149),
(45, -143), (41, -144), (36, -144), (31, -145), (25, -145),
(21, -145),
]
plotPoly(points, True, pencolor=(0.24, 0.29, 0.41),
fillcolor=(0.2, 0.32, 0.59), width=2)
# 右纽扣
points = [
(-82, -154), (-87, -155), (-91, -157), (-92, -161), (-93, -164),
(-93, -170), (-92, -173), (-89, -177), (-87, -179), (-85, -180),
(-80, -180), (-78, -179), (-75, -176), (-73, -172), (-72, -168),
(-74, -162), (-77, -157), (-80, -155),
]
plotPoly(points, True, pencolor=(0.27, 0.3, 0.29),
fillcolor=(0.88, 0.62, 0.26), width=2)
# 左纽扣
points = [
(27, -152), (21, -153), (17, -155), (15, -158), (13, -163),
(14, -168), (15, -171), (17, -174), (20, -177), (23, -178),
(28, -178), (33, -177), (36, -174), (38, -171), (39, -168),
(39, -163), (38, -158), (35, -156), (32, -153),
]
plotPoly(points, True, pencolor=(0.29, 0.21, 0.18),
fillcolor=(0.95, 0.6, 0.32), width=2)
# 衣服中间颜色
points = [
(-76, -192), (-81, -196), (-84, -201), (-85, -214), (-85, -226),
(-85, -234), (-77, -244), (-70, -251), (-63, -256), (-55, -260),
(-46, -264), (-38, -266), (-28, -266), (-19, -264), (-6, -262),
(2, -257), (13, -253), (23, -247), (29, -242), (35, -235),
(35, -227), (35, -215), (33, -205), (31, -197), (23, -191),
(16, -188), (8, -188), (2, -189), (-9, -190), (-21, -191),
(-33, -191), (-45, -191), (-55, -190), (-64, -190), (-70, -190),
(-73, -190),
]
plotPoly(points, True, pencolor=(0.18, 0.51, 0.61),
fillcolor=(0.2, 0.63, 0.71), width=2)
# 纹理
points = [
(-76, -222), (-76, -230), (-76, -239), (-76, -255),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(-58, -173), (-61, -185), (-61, -198), (-60, -244), (-60, -261),
(-59, -268),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(-47, -171), (-49, -182), (-51, -200), (-46, -264), (-45, -275),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(-36, -170), (-37, -178), (-38, -188), (-37, -206), (-36, -266),
(-34, -274),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(-23, -170), (-24, -179), (-25, -191), (-22, -256), (-20, -267),
(-20, -276),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(-13, -170), (-13, -183), (-13, -201), (-10, -261), (-10, -275),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(-4, -169), (-4, -183), (-3, -207), (-2, -257), (-1, -273),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(4, -168), (5, -184), (5, -204),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(8, -204), (9, -218), (10, -233), (10, -246), (10, -259),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(3, -169), (5, -180), (7, -190), (8, -209), (9, -220),
(10, -234), (10, -245), (10, -257), (11, -269),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(19, -188), (20, -197), (21, -211), (22, -225), (23, -239),
(23, -253), (23, -264),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
points = [
(33, -196), (34, -208), (35, -220), (35, -235), (35, -248),
(35, -264),
]
plotLine(points, pencolor=(0.07, 0.37, 0.53), width=2)
# 口袋
points = [
(-76, -193), (-63, -193), (-51, -194), (-36, -194), (-22, -194),
(-6, -193), (7, -192), (7, -204), (6, -216), (5, -229),
(4, -238), (1, -246), (-4, -252), (-11, -256), (-19, -259),
(-30, -261), (-43, -260), (-55, -256), (-65, -251), (-71, -240),
(-75, -228), (-77, -218), (-76, -209), (-76, -201),
]
plotPoly(points, True, pencolor=(0.06, 0.4, 0.45),
fillcolor=(0.29, 0.75, 0.92), width=2)
# 口袋上的针线
points = [
(-73, -198), (-66, -198),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-57, -199), (-49, -198),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-39, -199), (-32, -199),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-22, -199), (-16, -199),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-7, -198), (3, -198), (3, -204),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(2, -215), (1, -221),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(1, -230), (0, -237),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-3, -246), (-9, -250),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-17, -254), (-24, -255),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-34, -257), (-42, -256),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-50, -255), (-56, -251),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-64, -247), (-67, -241),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-70, -232), (-71, -225),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
points = [
(-72, -214), (-72, -208),
]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)
# 右手
points = [
(-129, -227), (-129, -232), (-128, -240), (-125, -245), (-121, -246),
(-116, -245), (-115, -240), (-114, -234), (-114, -230), (-112, -226),
(-110, -224), (-108, -220), (-106, -217), (-106, -212),
]
plotLine(points, pencolor=(0.27, 0.27, 0.3), width=2)
points = [
(-117, -247), (-117, -254),
]
plotLine(points, pencolor=(0.3, 0.23, 0.23), width=2)
points = [
(-107, -236), (-107, -241), (-107, -245), (-107, -251), (-107, -252),
]
plotLine(points, pencolor=(0.27, 0.24, 0.25), width=2)
# 左手
points = [
(59, -140), (62, -147), (66, -155), (71, -160),
(75, -166), (80, -171), (83, -175), (86, -182), (89, -188),
(91, -192), (93, -197), (93, -200), (93, -207), (93, -201),
(91, -204), (88, -206), (87, -208), (86, -210), (83, -213),
(83, -215), (82, -219), (82, -222), (80, -225), (80, -232),
(78, -236), (78, -239), (77, -242), (79, -245), (82, -247),
(86, -247), (90, -246), (93, -244), (95, -242), (95, -233),
(96, -241), (97, -243), (98, -248), (100, -252), (103, -256),
(106, -258), (109, -258), (112, -257), (115, -256), (116, -251),
(116, -235), (116, -252), (116, -255), (118, -257), (120, -258),
(123, -257), (126, -256), (127, -254), (129, -251), (130, -248),
(130, -233), (130, -249), (131, -250), (133, -251), (136, -248),
(138, -244), (139, -241), (139, -235), (139, -230),
]
plotLine(points, pencolor=(0.33, 0.24, 0.22), width=2)
# 右脚
points = [
(-102, -313), (-104, -318), (-105, -321), (-106, -325), (-106, -330),
(-106, -333),
]
plotLine(points, pencolor=(0.27, 0.19, 0.19), width=2)
points = [
(-83, -318), (-85, -323), (-86, -327), (-86, -332), (-86, -335),
(-85, -339),
]
plotLine(points, pencolor=(0.36, 0.26, 0.24), width=2)
# 左脚
points = [
(38, -324), (38, -331), (37, -335), (37, -340), (37, -344),
(37, -347),
]
plotLine(points, pencolor=(0.35, 0.29, 0.29), width=2)
points = [
(65, -325), (66, -332), (66, -337), (67, -343), (67, -348),
]
plotLine(points, pencolor=(0.29, 0.25, 0.27), width=2)
points = [
(85, -322), (87, -326), (88, -329), (88, -333), (89, -338),
(89, -342),
]
plotLine(points, pencolor=(0.25, 0.19, 0.15), width=2)
points = [
(56, -272), (56, -277), (56, -282), (57, -287), (58, -290),
(59, -290), (59, -288), (62, -288), (66, -288), (70, -290),
(74, -292), (76, -294),
]
plotLine(points, pencolor=(0.25, 0.19, 0.15), width=2)
# 尾巴
points = [
(99, -255), (96, -257), (90, -258), (86, -258), (89, -262),
(93, -265), (95, -267), (95, -269), (93, -272), (91, -275),
(84, -275), (80, -275), (79, -277), (80, -278), (83, -279),
(84, -281), (84, -283), (82, -284), (81, -285), (82, -287),
(87, -288), (90, -287), (94, -286), (94, -283), (94, -281),
(92, -280), (92, -278), (93, -277), (96, -277), (99, -277),
(103, -277), (106, -277), (105, -275), (103, -273), (103, -272),
(106, -272), (109, -271), (113, -270), (114, -269), (112, -268),
(110, -266), (109, -265), (107, -264), (107, -262), (109, -261),
(106, -260), (104, -259), (101, -257),
]
plotPoly(points, True, pencolor=(0.66, 0.64, 0.64),
fillcolor=(0.66, 0.64, 0.64), width=2)
# 隐藏海龟
turtle.hideturtle()
turtle.done()
视频已发布到抖音和 b 站。抖音和b站名称:会代码的依古比古。
抖音视频网址:用代码画出小灰灰
b站视频网址:用代码画出小灰灰_哔哩哔哩_bilibili