-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab1.py
More file actions
82 lines (48 loc) · 2.38 KB
/
Copy pathlab1.py
File metadata and controls
82 lines (48 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import pygame
import sys
import math
import time
pygame.init()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
screen=pygame.display.set_mode((640,480))
color=[(255,0,0),(0,255,0),(0,0,255),(0,0,0),(255,255,255)]
screen.fill(color[4])
#face
pygame.draw.lines(screen, (0,0,0), False, [(200,270),(100,350)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(180,206),(45,314)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(100,350),(45,314)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(180,206),(200,270)], 1)
pygame.draw.circle(screen, (0,0,0), (100,290), 7, 0)
pygame.draw.arc(screen, (0,0,0), (30,280,60,60),-1, 0, 2)
# pygame.draw.arc(screen, (0,0,0), (70,300,20,20),-2, 1.5, 2)
#horn
pygame.draw.lines(screen, (0,0,0), False, [(45,314),(20,260)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(70,294),(20,260)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(70,294),(60,270)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(90,278),(60,270)], 1)
#body
pygame.draw.rect(screen, (0,0,0), (200,200,150,150), 1)
pygame.draw.rect(screen, (0,0,0), (350,215,120,130), 1)
#fore legs
pygame.draw.lines(screen, (0,0,0), False, [(260,350),(265,370)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(330,350),(325,370)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(265,370),(325,370)], 1)
pygame.draw.rect(screen, (0,0,0), (285,370,40,70), 1)
pygame.draw.lines(screen, (0,0,0), False, [(285,439),(270,439)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(285,425),(270,439)], 1)
#hind legs
pygame.draw.lines(screen, (0,0,0), False, [(470,345),(465,370)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(400,345),(405,370)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(465,370),(405,370)], 1)
pygame.draw.rect(screen, (0,0,0), (425,370,40,70), 1)
pygame.draw.lines(screen, (0,0,0), False, [(425,439),(410,439)], 1)
pygame.draw.lines(screen, (0,0,0), False, [(425,425),(410,439)], 1)
#tail
pygame.draw.arc(screen, (0,0,0), (470,250,90,20),-3, -1, 1)
# pygame.draw.lines(screen, (0,0,0), False, [(1,1),(100,100)], 1)
# pygame.draw.circle(screen, (0,0,0), (100,290), 7, 0)
pygame.display.update()