美文网首页
Day9随手画-PigJorge

Day9随手画-PigJorge

作者: 周zau1 | 来源:发表于2018-07-27 22:08 被阅读104次
# Jay
import pygame
if __name__ == '__main__':
    pygame.init()
    screen = pygame.display.set_mode((400, 400))
    screen.fill((255, 255, 255))

    from math import pi

    pygame.draw.line(screen, (255, 195, 231), (153, 60), (168, 90), 10)
    pygame.draw.line(screen, (255, 195, 231), (120, 70), (140, 105), 10)
    pygame.draw.circle(screen, (116, 174, 238), (200, 230), 80, 0)      # 蓝色身体
    pygame.draw.circle(screen, (86, 154, 219), (200, 230), 80, 5)       # 身体外圈
    pygame.draw.circle(screen, (255, 195, 231), (200, 150), 80, 0)      # 粉红圆脸
    pygame.draw.circle(screen, (248, 166, 211), (200, 150), 80, 5)      # 脸外圈
    pygame.draw.circle(screen, (255, 195, 231), (290, 90), 40, 0)      # 粉红鼻子
    pygame.draw.circle(screen, (248, 166, 211), (290, 90), 40, 5)       # 鼻子外圈
    pygame.draw.line(screen, (255, 195, 231), (200, 150), (290, 95), 80)
    pygame.draw.line(screen, (255, 195, 231), (200, 110), (290, 90), 80)
    pygame.draw.line(screen, (248, 166, 211), (200, 71), (290, 52), 5)
    pygame.draw.line(screen, (248, 166, 211), (278, 145), (296, 128), 7)
    pygame.draw.arc(screen, (248, 166, 211), (278, 40, 80, 80), pi / 2 + pi / 4, pi + pi/2, 5)
    pygame.draw.circle(screen, (241, 125, 198), (310, 80), 6, 0)       # 右鼻孔
    pygame.draw.circle(screen, (241, 125, 198), (295, 85), 6, 0)        # 左鼻孔
    pygame.draw.circle(screen, (255, 165, 226), (160, 170), 20, 0)      # 脸部红晕
    pygame.draw.circle(screen, (255, 255, 255), (180, 120), 10, 0)      # 左眼白
    pygame.draw.circle(screen, (255, 255, 255), (210, 105), 10, 0)      # 右眼白
    pygame.draw.circle(screen, (0, 0, 0), (215, 105), 5, 0)             # 右眼球
    pygame.draw.circle(screen, (0, 0, 0), (185, 120), 5, 0)             # 左眼球
    pygame.draw.circle(screen, (248, 166, 211), (180, 120), 15, 5)      # 左眼轮廓
    pygame.draw.circle(screen, (248, 166, 211), (210, 105), 15, 5)      # 右眼轮廓
    pygame.draw.arc(screen, (205, 113, 160), (210, 155, 40, 40), pi + pi / 5, 2 * pi, 5)       # 嘴
    pygame.draw.lines(screen, (248, 166, 211), False, [(160, 90), (150, 70), (150, 60), (160, 60), (175, 85)], 8)
    pygame.draw.lines(screen, (248, 166, 211), False, [(138, 113), (120, 80), (120, 70), (130, 70), (145, 100)], 8)

    pygame.display.flip()
    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                exit()

Jorge

相关文章

网友评论

      本文标题:Day9随手画-PigJorge

      本文链接:https://www.haomeiwen.com/subject/pchnmftx.html