当前位置:   article > 正文

Python画十二生肖(新年版)二_turtle龙年

turtle龙年

前言

上次做完了前两个生肖,今天再做两个。


一、福虎

生肖虎十二生肖中位居第三,在十二地支配属"寅",故一天十二时晨中之="寅时"--清晨三点至五点又称"虎时"。据古书载。这时候,老虎是最活跃、最凶猛、伤人最多,因为寅时同虎搭配

代码:

  1. from turtle import *
  2. import time
  3. COLOR = '#B2814D'
  4. def set_start(x, y, w, c=COLOR):
  5. penup()
  6. setx(x)
  7. sety(y)
  8. setheading(towards(0, 0))
  9. width(w)
  10. pencolor(c)
  11. pendown()
  12. speed(0)
  13. def left_rotate(time, angle, length):
  14. for i in range(time):
  15. left(angle)
  16. forward(length)
  17. def right_rotate(time, angle, length):
  18. for i in range(time):
  19. right(angle)
  20. forward(length)
  21. def draw_circle(radius, color, color2=''):
  22. if color2 == '':
  23. color2 = color
  24. penup()
  25. setheading(towards(0, 0))
  26. right(90)
  27. pencolor(color)
  28. pendown()
  29. begin_fill()
  30. circle(radius)
  31. fillcolor(color2)
  32. end_fill()
  33. def fill_color(color):
  34. def decorator_all(func):
  35. def wrapper(*args, **kwargs):
  36. begin_fill()
  37. func(*args, **kwargs)
  38. fillcolor(color)
  39. end_fill()
  40. return wrapper
  41. return decorator_all
  42. def fill_color_patch(x, y, c='#fffffb'):
  43. set_start(x, y, 1, c=c)
  44. forward(1)
  45. def head_outline():
  46. set_start(0, -40, 2.5)
  47. right(90)
  48. left_rotate(5, 3, 14)
  49. left_rotate(5, 8, 8)
  50. left_rotate(10, 5, 6.5)
  51. left_rotate(5, 5.5, 10)
  52. left_rotate(25, 4, 10)
  53. left_rotate(6, 5.5, 5)
  54. left_rotate(7, 3, 7)
  55. left_rotate(5, 10, 8)
  56. left_rotate(5, 3, 14)
  57. @fill_color('#fdb933')
  58. def draw_head():
  59. head_outline()
  60. pencolor('#CDCDCD')
  61. goto(0, -40)
  62. @fill_color('#fffffb')
  63. def draw_face():
  64. set_start(0, -40, 2.5)
  65. right(90)
  66. left_rotate(5, 3, 14)
  67. left_rotate(1, 80, 2.5)
  68. pencolor('#fffffb')
  69. left_rotate(12, 5, 6.5)
  70. left_rotate(5, 6, 15)
  71. left_rotate(5, 5, 10)
  72. left_rotate(5, 12, 10)
  73. backward(0.5)
  74. left(65)
  75. pencolor(COLOR)
  76. backward(3)
  77. left_rotate(5, 3, 14)
  78. forward(5)
  79. def draw_moustache():
  80. fill_color_patch(-41, -31)
  81. begin_fill()
  82. set_start(-41, -31, 2.5)
  83. right(180)
  84. left_rotate(4, 20, 4)
  85. left_rotate(1, 90, 8)
  86. right(150)
  87. left_rotate(4, 25, 3)
  88. forward(6)
  89. left_rotate(1, 110, 5.5)
  90. right(165)
  91. left_rotate(4, 15, 3.2)
  92. left(150)
  93. right_rotate(3, 30, 2.2)
  94. right_rotate(1, 105, 5)
  95. left(130)
  96. right_rotate(6, 5, 1.8)
  97. right_rotate(1, 130, 2)
  98. left(60)
  99. left_rotate(2, 30, 1)
  100. left_rotate(4, 28, 4)
  101. fillcolor('#fffffb')
  102. end_fill()
  103. set_start(-45, -28, 2.5)
  104. right(70)
  105. left_rotate(5, 2.5, 4)
  106. left_rotate(4, 9, 3)
  107. left_rotate(5, 3, 4.5)
  108. def draw_mouth():
  109. set_start(-17, 22, 2.5)
  110. right_rotate(1, 45, 14)
  111. left_rotate(1, 85, 35)
  112. left_rotate(1, 70, 7)
  113. set_start(-17, 22, 2.5)
  114. right_rotate(1, 45, 14)
  115. right_rotate(1, 78, 36)
  116. right_rotate(1, 65, 6)
  117. set_start(-17, 22, 2.5)
  118. right_rotate(1, 45, 14)
  119. left_rotate(1, 85, 30)
  120. right_rotate(1, 108, 12)
  121. right_rotate(1, 140, 5)
  122. set_start(-17, 22, 2.5)
  123. right_rotate(1, 45, 14)
  124. right_rotate(1, 75, 28)
  125. left_rotate(1, 85, 10)
  126. left_rotate(1, 130, 8)
  127. set_start(3, 0, 2.5)
  128. left(90)
  129. right_rotate(5, 5, 4.8)
  130. right_rotate(4, 18, 1.8)
  131. left_rotate(1, 3, 27)
  132. right_rotate(4, 18, 1)
  133. right_rotate(1, 15, 22)
  134. right(88)
  135. right_rotate(9, 1, 4.5)
  136. begin_fill()
  137. set_start(3, 0, 2.5)
  138. left(90)
  139. right_rotate(4, 5, 4.8)
  140. right_rotate(1, 5, 2)
  141. right_rotate(1, 67, 37)
  142. right_rotate(1, 86, 18)
  143. fillcolor('#f15a22')
  144. end_fill()
  145. begin_fill()
  146. set_start(3, 0, 2.5)
  147. pencolor('#aa2116')
  148. left(90)
  149. right_rotate(2, 5, 6)
  150. right(120)
  151. left_rotate(10, 6, 2)
  152. right(55)
  153. left_rotate(11, 5.5, 1.8)
  154. right_rotate(1, 110, 10)
  155. right(100)
  156. right_rotate(9, 1, 4.5)
  157. fillcolor('#aa2116')
  158. end_fill()
  159. set_start(3, 0, 2.5)
  160. left(90)
  161. right_rotate(5, 5, 4.8)
  162. right_rotate(4, 18, 1.8)
  163. left_rotate(1, 3, 27)
  164. right_rotate(4, 18, 1)
  165. right_rotate(1, 15, 22)
  166. right(88)
  167. right_rotate(9, 1, 4.5)
  168. set_start(21, 10, 1, c='#fdb933')
  169. draw_circle(2.3, '#fdb933')
  170. set_start(10, 16, 1, c='#fdb933')
  171. draw_circle(2.3, '#fdb933')
  172. set_start(21, 19, 1, c='#fdb933')
  173. draw_circle(2.3, '#fdb933')
  174. set_start(-57, 16, 1, c='#fdb933')
  175. draw_circle(2.3, '#fdb933')
  176. set_start(-51, 24, 1, c='#fdb933')
  177. draw_circle(2.3, '#fdb933')
  178. set_start(-64, 24, 1, c='#fdb933')
  179. draw_circle(2.3, '#fdb933')
  180. def draw_nose():
  181. set_start(6, 37, 1)
  182. pencolor('#e0861a')
  183. right(150)
  184. begin_fill()
  185. left_rotate(6, 3, 4)
  186. left_rotate(6, 15, 3)
  187. left_rotate(6, 3, 4)
  188. fillcolor('#e0861a')
  189. end_fill()
  190. set_start(6, 37, 1.5)
  191. right(120)
  192. begin_fill()
  193. left_rotate(5, 4, 4)
  194. left_rotate(3, 10, 3)
  195. left_rotate(5, 4, 4)
  196. left_rotate(7, 15, 0.8)
  197. left_rotate(5, 4, 4)
  198. left_rotate(5, 8, 2)
  199. left_rotate(5, 4, 4)
  200. left_rotate(7, 15, 0.8)
  201. fillcolor('#b4532a')
  202. end_fill()
  203. set_start(-16, 36, 1)
  204. pencolor('#d1923f')
  205. right(75)
  206. begin_fill()
  207. right_rotate(4, 15, 2)
  208. right_rotate(5, 26, 1)
  209. right_rotate(4, 15, 2)
  210. right_rotate(5, 26, 1)
  211. fillcolor('#d1923f')
  212. end_fill()
  213. set_start(-25, 25, 1)
  214. pencolor('#130c0e')
  215. left(110)
  216. begin_fill()
  217. left_rotate(6, 15, 1.5)
  218. left_rotate(5, 15, 1)
  219. fillcolor('#130c0e')
  220. end_fill()
  221. set_start(-10, 24, 1)
  222. pencolor('#130c0e')
  223. left(175)
  224. begin_fill()
  225. right_rotate(6, 15, 1.2)
  226. right_rotate(5, 15, 1)
  227. fillcolor('#130c0e')
  228. end_fill()
  229. def draw_eye():
  230. set_start(-50, 34, 1, c='#130c0e')
  231. left(115)
  232. begin_fill()
  233. left_rotate(8, 6.5, 7)
  234. left_rotate(5, 15, 7)
  235. left_rotate(5, 10, 5.5)
  236. left_rotate(5, 15, 6)
  237. left_rotate(5, 5, 9.5)
  238. left_rotate(4, 30, 2)
  239. fillcolor('#130c0e')
  240. end_fill()
  241. set_start(-57, 40, 1, c='#fffffb')
  242. left(112)
  243. begin_fill()
  244. left_rotate(8, 6.5, 5)
  245. left_rotate(5, 15, 6)
  246. left_rotate(5, 10, 4.5)
  247. left_rotate(5, 15, 5)
  248. left_rotate(5, 6.5, 7)
  249. left_rotate(4, 15, 2)
  250. fillcolor('#fffffb')
  251. end_fill()
  252. set_start(-90, 62, 1, c='#563624')
  253. draw_circle(15, '#563624')
  254. set_start(-84, 59, 1, c='#130c0e')
  255. draw_circle(9, '#130c0e')
  256. set_start(-90, 63, 1, c='#fffffb')
  257. draw_circle(3.5, '#fffffb')
  258. set_start(16, 25, 1, c='#130c0e')
  259. right(150)
  260. begin_fill()
  261. right_rotate(8, 6.5, 7)
  262. right_rotate(5, 15, 7)
  263. right_rotate(5, 10, 5.5)
  264. right_rotate(5, 15, 6)
  265. right_rotate(5, 5, 9.5)
  266. right_rotate(4, 30, 2)
  267. fillcolor('#130c0e')
  268. end_fill()
  269. set_start(24, 28, 1, c='#fffffb')
  270. right(135)
  271. begin_fill()
  272. right_rotate(8, 7, 5)
  273. right_rotate(5, 15, 5.5)
  274. right_rotate(5, 10, 4.5)
  275. right_rotate(5, 15, 4.5)
  276. right_rotate(5, 6.5, 6.5)
  277. right_rotate(4, 13, 2)
  278. fillcolor('#fffffb')
  279. end_fill()
  280. set_start(57, 48, 1, c='#563624')
  281. draw_circle(15, '#563624')
  282. set_start(53, 44, 1, c='#130c0e')
  283. draw_circle(9, '#130c0e')
  284. set_start(38, 47, 1, c='#fffffb')
  285. draw_circle(3.5, '#fffffb')
  286. def draw_brow():
  287. set_start(12, 88, 1, c='#130c0e')
  288. right(82)
  289. begin_fill()
  290. left_rotate(3, 3, 5)
  291. right_rotate(5, 4, 6)
  292. right_rotate(7, 24, 2.3)
  293. right_rotate(3, 5, 4.5)
  294. left_rotate(1, 90, 8)
  295. left(95)
  296. left_rotate(3, 8, 5)
  297. right_rotate(3, 25, 1.2)
  298. right_rotate(3, 11, 1.5)
  299. right_rotate(3, 25, 1.2)
  300. right_rotate(3, 3, 4.5)
  301. left_rotate(1, 85, 7)
  302. left_rotate(1, 90, 15)
  303. right_rotate(5, 30, 2.2)
  304. right_rotate(3, 9, 6)
  305. right_rotate(6, 3, 5)
  306. right_rotate(8, 18, 1.3)
  307. right_rotate(3, 10, 5.3)
  308. left_rotate(1, 90, 8)
  309. left(112)
  310. right_rotate(3, 3, 4.5)
  311. right_rotate(3, 25, 1)
  312. right_rotate(3, 10, 1.5)
  313. right_rotate(3, 28, 1)
  314. left_rotate(3, 5, 3)
  315. left_rotate(3, 25, 1)
  316. left_rotate(3, 5, 1.8)
  317. left_rotate(1, 90, 17)
  318. right_rotate(3, 35, 0.8)
  319. right_rotate(3, 10, 3)
  320. fillcolor('#130c0e')
  321. end_fill()
  322. set_start(88, -16, 1, c='#130c0e')
  323. begin_fill()
  324. right_rotate(5, 15, 3)
  325. right_rotate(4, 5.5, 3)
  326. right_rotate(3, 28, 1)
  327. right_rotate(5, 6, 4)
  328. fillcolor('#130c0e')
  329. end_fill()
  330. set_start(106, 9, 1, c='#130c0e')
  331. right(15)
  332. begin_fill()
  333. right_rotate(5, 5, 5.5)
  334. right_rotate(5, 29, 3)
  335. right_rotate(5, 5, 4.5)
  336. fillcolor('#130c0e')
  337. end_fill()
  338. set_start(110, 36, 1, c='#130c0e')
  339. left(20)
  340. begin_fill()
  341. right_rotate(3, 10, 2)
  342. right_rotate(3, 10, 6)
  343. right_rotate(5, 29, 2)
  344. forward(20)
  345. fillcolor('#130c0e')
  346. end_fill()
  347. set_start(75, 76, 1, c='#130c0e')
  348. right(105)
  349. begin_fill()
  350. left_rotate(5, 10, 4)
  351. right_rotate(6, 28, 2)
  352. right_rotate(5, 10, 5)
  353. right_rotate(6, 25, 2)
  354. fillcolor('#130c0e')
  355. end_fill()
  356. set_start(-75, 100, 1, c='#130c0e')
  357. right(108)
  358. begin_fill()
  359. right_rotate(3, 3, 8)
  360. right_rotate(4, 35, 2)
  361. right_rotate(8, 9, 3.2)
  362. fillcolor('#130c0e')
  363. end_fill()
  364. set_start(-145, 58, 1, c='#130c0e')
  365. right(30)
  366. begin_fill()
  367. left_rotate(5, 15, 5)
  368. left_rotate(3, 18, 3)
  369. left(92)
  370. right_rotate(4, 5, 6)
  371. right_rotate(1, 5, 4)
  372. fillcolor('#130c0e')
  373. end_fill()
  374. set_start(-148, 46, 1, c='#130c0e')
  375. left(40)
  376. begin_fill()
  377. right_rotate(5, 10, 6.5)
  378. right_rotate(4, 32, 2)
  379. right_rotate(4, 10, 6.5)
  380. fillcolor('#130c0e')
  381. end_fill()
  382. set_start(-138, 7, 1, c='#130c0e')
  383. left(10)
  384. begin_fill()
  385. left_rotate(5, 8, 4)
  386. left_rotate(6, 20, 1.5)
  387. left_rotate(4, 8, 4.5)
  388. fillcolor('#130c0e')
  389. end_fill()
  390. head_outline()
  391. def draw_ear():
  392. set_start(101, 74, 2.5)
  393. left(150)
  394. begin_fill()
  395. left_rotate(5, 6, 3)
  396. left_rotate(5, 12, 5)
  397. left_rotate(3, 13, 12)
  398. left_rotate(5, 12, 7)
  399. left_rotate(4, 16, 5)
  400. fillcolor('#fdb933')
  401. end_fill()
  402. set_start(94, 89, 1, c='#f3715c')
  403. right(168)
  404. begin_fill()
  405. left_rotate(5, 17, 6)
  406. left_rotate(4, 20, 5)
  407. goto(94, 89)
  408. fillcolor('#f3715c')
  409. end_fill()
  410. set_start(-125, 98, 2.5)
  411. right(165)
  412. begin_fill()
  413. right_rotate(5, 6, 3)
  414. right_rotate(5, 12, 5)
  415. right_rotate(3, 13, 12)
  416. right_rotate(5, 12, 7)
  417. right_rotate(4, 16, 4.5)
  418. fillcolor('#fdb933')
  419. end_fill()
  420. set_start(-115, 110, 1, c='#f3715c')
  421. left(160)
  422. begin_fill()
  423. right_rotate(5, 17, 6)
  424. right_rotate(4, 20, 5.5)
  425. goto(-115, 110)
  426. fillcolor('#f3715c')
  427. end_fill()
  428. head_outline()
  429. def draw_cap():
  430. set_start(55, 123, 2.5)
  431. right(150)
  432. left_rotate(13, 11, 12)
  433. set_start(18, 170, 2.5)
  434. right(180)
  435. begin_fill()
  436. left_rotate(10, 16, 4)
  437. fillcolor('#130c0e')
  438. end_fill()
  439. set_start(55, 123, 2.5)
  440. right(150)
  441. begin_fill()
  442. left_rotate(13, 11, 12)
  443. fillcolor('#FF0000')
  444. end_fill()
  445. set_start(55, 123, 2.5)
  446. right(113)
  447. begin_fill()
  448. left_rotate(15, 5, 8.6)
  449. fillcolor('#228B22')
  450. end_fill()
  451. set_start(30, 142, 2.5)
  452. right(170)
  453. left_rotate(18, 8.9, 5)
  454. set_start(-2, 150, 2.5)
  455. left(178)
  456. right_rotate(4, 5, 6)
  457. set_start(55, 123, 2.5)
  458. begin_fill()
  459. goto(50.13, 124.56)
  460. setheading(148.5)
  461. left_rotate(12, 4, 10)
  462. fillcolor('#fdb933')
  463. end_fill()
  464. def draw_shadow():
  465. fill_color_patch(75, -155)
  466. _draw_shadow()
  467. @fill_color('#fab27b')
  468. def _draw_shadow():
  469. set_start(75, -155, 1, c='#fab27b')
  470. left_rotate(5, 8, 5)
  471. left_rotate(10, 4, 10)
  472. left_rotate(5, 6, 9)
  473. left_rotate(4, 30, 4.5)
  474. left_rotate(5, 3.5, 16)
  475. left_rotate(3, 3.5, 18)
  476. left_rotate(3, 8, 5)
  477. left_rotate(4, 20, 1.5)
  478. goto(75, -155)
  479. def draw_body():
  480. fill_color_patch(0, -40)
  481. set_start(0, -40, 2.5)
  482. right(90)
  483. begin_fill()
  484. left_rotate(2, 3, 14)
  485. width(2.4)
  486. goto(53, -74)
  487. pencolor('#87481f')
  488. left(20)
  489. right_rotate(5, 16, 1.3)
  490. right_rotate(4, 8, 8)
  491. right_rotate(1, 15, 2)
  492. right_rotate(1, 30, 7)
  493. right_rotate(3, 28, 2)
  494. right_rotate(1, 5, 4)
  495. right_rotate(1, 90, 6)
  496. right_rotate(1, 180, 10)
  497. right_rotate(3, 5, 8)
  498. right_rotate(3, 10, 6.5)
  499. right_rotate(2, 15, 2)
  500. right_rotate(4, 7, 4.5)
  501. left_rotate(2, 18, 1)
  502. left_rotate(4, 12, 5)
  503. left_rotate(4, 15, 3)
  504. left_rotate(4, 7, 4)
  505. right_rotate(1, 82, 2)
  506. right_rotate(4, 8, 7)
  507. right_rotate(2, 12, 2)
  508. right_rotate(4, 28, 1.5)
  509. right_rotate(1, 10, 6)
  510. right_rotate(1, 60, 4.5)
  511. right(170)
  512. right_rotate(5, 10, 5)
  513. right_rotate(10, 2.5, 5)
  514. goto(-71.81, -32.68)
  515. setheading(345.5)
  516. width(2.5)
  517. pencolor(COLOR)
  518. left_rotate(2, 3, 14)
  519. fillcolor('#fdb933')
  520. end_fill()
  521. set_start(0, -42, 1)
  522. right(90)
  523. pencolor('#fffffb')
  524. begin_fill()
  525. right_rotate(5, 12, 5)
  526. right_rotate(3, 13, 15)
  527. right_rotate(3, 25, 12)
  528. backward(1)
  529. right(23)
  530. left_rotate(3, 15, 6)
  531. right(5)
  532. right_rotate(3, 20, 11)
  533. right_rotate(3, 15, 12)
  534. right_rotate(3, 15, 10)
  535. right_rotate(1, 15, 20)
  536. fillcolor('#fffffb')
  537. end_fill()
  538. set_start(37, -125, 1)
  539. pencolor('#130c0e')
  540. begin_fill()
  541. right_rotate(1, 5, 8)
  542. right_rotate(4, 30, 1.5)
  543. right_rotate(1, 20, 6)
  544. fillcolor('#130c0e')
  545. end_fill()
  546. set_start(29, -130, 1)
  547. pencolor('#130c0e')
  548. begin_fill()
  549. left(20)
  550. right_rotate(2, 5, 5)
  551. left_rotate(4, 30, 1.5)
  552. left_rotate(2, 10, 4)
  553. right_rotate(3, 20, 2)
  554. left(155)
  555. left_rotate(3, 8, 5)
  556. fillcolor('#130c0e')
  557. end_fill()
  558. set_start(-62, -139, 1)
  559. pencolor('#130c0e')
  560. begin_fill()
  561. right(65)
  562. left_rotate(2, 10, 4)
  563. left_rotate(3, 25, 1.5)
  564. left_rotate(1, 10, 2)
  565. left_rotate(3, 28, 1.5)
  566. right_rotate(3, 10, 3.5)
  567. fillcolor('#130c0e')
  568. end_fill()
  569. set_start(-71, -118, 1)
  570. pencolor('#130c0e')
  571. begin_fill()
  572. right(50)
  573. left_rotate(4, 10, 2.5)
  574. left_rotate(5, 28, 1.5)
  575. right_rotate(3, 10, 2.5)
  576. fillcolor('#130c0e')
  577. end_fill()
  578. set_start(-75, -94, 1)
  579. pencolor('#130c0e')
  580. begin_fill()
  581. right(30)
  582. left_rotate(4, 10, 2.5)
  583. left_rotate(5, 28, 1.5)
  584. right_rotate(3, 10, 2.5)
  585. fillcolor('#130c0e')
  586. end_fill()
  587. def draw_left_hand():
  588. set_start(0, -40, 2.5)
  589. right(90)
  590. left_rotate(4, 3, 14)
  591. left_rotate(1, 3, 8)
  592. right_rotate(1, 33, 3)
  593. begin_fill()
  594. left_rotate(1, 0, 4)
  595. left_rotate(3, 7, 7)
  596. left_rotate(4, 18, 3.8)
  597. set_start(103, -26, 2.5)
  598. right_rotate(3, 20, 4.5)
  599. right_rotate(3, 20, 2.5)
  600. right_rotate(2, 20, 2)
  601. right_rotate(2, 18, 5)
  602. right_rotate(5, 30, 1.5)
  603. right_rotate(1, 5, 8)
  604. right_rotate(1, 180, 2)
  605. right_rotate(2, 40, 3.5)
  606. set_start(106, -8, 2.5)
  607. right(90)
  608. right_rotate(2, 10, 4)
  609. right_rotate(4, 24, 3)
  610. right_rotate(2, 10, 4)
  611. right_rotate(2, 20, 5)
  612. right_rotate(5, 26, 1.2)
  613. right_rotate(2, 10, 4)
  614. right_rotate(1, 190, 4)
  615. right_rotate(1, 90, 3)
  616. set_start(128, -12, 2.5)
  617. left(155)
  618. right_rotate(3, 20, 5.5)
  619. right_rotate(2, 25, 1.5)
  620. right_rotate(1, 25, 4)
  621. right_rotate(3, 25, 2)
  622. right_rotate(2, 10, 3)
  623. set_start(124, -30, 2.5)
  624. left(150)
  625. right_rotate(8, 25, 2)
  626. right_rotate(1, 15, 3)
  627. right_rotate(2, 28, 2)
  628. set_start(115, -35, 2.5)
  629. left(100)
  630. right_rotate(5, 26, 1.8)
  631. right_rotate(1, 25, 5)
  632. set_start(103, -31, 2.5)
  633. left(135)
  634. right_rotate(5, 10, 5)
  635. right_rotate(4, 15, 6)
  636. left_rotate(1, 100, 7)
  637. right(120)
  638. right_rotate(3, 12, 2.5)
  639. left(170)
  640. right_rotate(3, 15, 3)
  641. right(110)
  642. right_rotate(3, 12, 3)
  643. left(140)
  644. right_rotate(3, 12, 3)
  645. right(120)
  646. right_rotate(3, 10, 3.5)
  647. left_rotate(1, 125, 10)
  648. right_rotate(3, 23, 3)
  649. right_rotate(3, 9, 9.5)
  650. fillcolor('#fdb933')
  651. end_fill()
  652. set_start(115, -35, 2.5)
  653. left(100)
  654. begin_fill()
  655. right_rotate(5, 26, 1.8)
  656. right_rotate(1, 25, 5)
  657. pencolor('#fffffb')
  658. width(1)
  659. left(90)
  660. right_rotate(4, 40, 2)
  661. left(90)
  662. right_rotate(4, 40, 1)
  663. left_rotate(1, 135, 5)
  664. right(80)
  665. right_rotate(3, 26, 4.5)
  666. right(130)
  667. left_rotate(3, 28, 3)
  668. fillcolor('#fffffb')
  669. end_fill()
  670. set_start(61, -33, 1)
  671. left(118)
  672. pencolor('#130c0e')
  673. begin_fill()
  674. right_rotate(3, 5, 3.5)
  675. right_rotate(4, 32, 1.5)
  676. right_rotate(3, 12, 2.7)
  677. fillcolor('#130c0e')
  678. end_fill()
  679. set_start(78, -36, 1)
  680. left(110)
  681. pencolor('#130c0e')
  682. begin_fill()
  683. left_rotate(3, 5, 3.5)
  684. right(50)
  685. right_rotate(4, 20, 1)
  686. right_rotate(5, 10, 3)
  687. fillcolor('#130c0e')
  688. end_fill()
  689. set_start(94, -35, 1)
  690. left(125)
  691. pencolor('#130c0e')
  692. begin_fill()
  693. left_rotate(3, 5, 2)
  694. right(50)
  695. right_rotate(4, 25, 2)
  696. right_rotate(3, 10, 2.2)
  697. fillcolor('#130c0e')
  698. end_fill()
  699. def draw_right_hand():
  700. fill_color_patch(-44.24, -37.54)
  701. set_start(-44.24, -37.54, 2.5)
  702. setheading(351.5)
  703. begin_fill()
  704. right(177)
  705. right_rotate(4, 3, 14)
  706. right(3)
  707. goto(-106, -22)
  708. set_start(-106, -22, 2.5)
  709. right(175)
  710. right_rotate(3, 5, 5.5)
  711. right_rotate(3, 22, 4)
  712. right(80)
  713. left_rotate(2, 25, 4)
  714. left_rotate(4, 35, 5.5)
  715. left_rotate(3, 30, 1.5)
  716. left_rotate(3, 20, 2)
  717. left_rotate(1, 10, 2.5)
  718. right(120)
  719. left_rotate(3, 20, 2.5)
  720. set_start(-143, -2, 2.5)
  721. left(120)
  722. left_rotate(4, 25, 3.5)
  723. left_rotate(1, 35, 3)
  724. left_rotate(2, 15, 3)
  725. left_rotate(5, 22, 3.5)
  726. left_rotate(2, 20, 2.5)
  727. set_start(-155, -7, 2.5)
  728. left(170)
  729. left_rotate(2, 35, 3.5)
  730. left_rotate(2, 12, 4.5)
  731. left_rotate(3, 28, 4)
  732. left_rotate(3, 10, 3)
  733. left_rotate(3, 28, 3.5)
  734. set_start(-158, -27, 2.5)
  735. right(130)
  736. left_rotate(3, 30, 2.5)
  737. left_rotate(4, 13, 4)
  738. left_rotate(4, 35, 2.5)
  739. set_start(-135, -25, 2.5)
  740. right(95)
  741. left_rotate(3, 12, 9)
  742. left_rotate(4, 12, 4)
  743. right_rotate(1, 90, 8)
  744. left(120)
  745. left_rotate(3, 12, 3)
  746. right(160)
  747. left_rotate(3, 10, 4)
  748. left(120)
  749. left_rotate(3, 12, 3.5)
  750. right(145)
  751. left_rotate(3, 10, 3.5)
  752. left(125)
  753. left_rotate(3, 10, 3.5)
  754. right_rotate(1, 135, 10)
  755. fillcolor('#fdb933')
  756. end_fill()
  757. fill_color_patch(-107, -23)
  758. begin_fill()
  759. set_start(-107, -23, 1)
  760. pencolor('#130c0e')
  761. right(90)
  762. right_rotate(3, 3, 3.5)
  763. left_rotate(5, 25, 1)
  764. left_rotate(3, 15, 3.2)
  765. fillcolor('#130c0e')
  766. end_fill()
  767. fill_color_patch(-122, -25)
  768. begin_fill()
  769. set_start(-122, -25, 1)
  770. pencolor('#130c0e')
  771. right(120)
  772. left_rotate(3, 5, 2)
  773. left_rotate(4, 30, 1.4)
  774. left_rotate(3, 15, 3)
  775. fillcolor('#130c0e')
  776. end_fill()
  777. def draw_clothes():
  778. set_start(0, -40, 2.5)
  779. right(90)
  780. begin_fill()
  781. left_rotate(3, 3, 14)
  782. goto(47.57, -36.43)
  783. setheading(94.25)
  784. left(171)
  785. left_rotate(3, 9, 9.5)
  786. left_rotate(1, 9, 3)
  787. left_rotate(2, 23, 2.5)
  788. right(150)
  789. left_rotate(3, 10, 5)
  790. right_rotate(3, 10, 10)
  791. right_rotate(1, 20, 4)
  792. right_rotate(2, 10, 4)
  793. right(90)
  794. left_rotate(5, 5, 10)
  795. fillcolor('#FF0000')
  796. end_fill()
  797. set_start(0, -40, 2.5)
  798. right(90)
  799. begin_fill()
  800. left_rotate(1, 3, 14)
  801. left_rotate(1, 3, 13)
  802. right(88)
  803. right_rotate(5, 5, 10)
  804. goto(21.85, -91.11)
  805. setheading(197.25)
  806. right_rotate(1, 20, 4)
  807. right_rotate(2, 10, 4)
  808. right(90)
  809. left_rotate(5, 5, 10)
  810. fillcolor('#228B22')
  811. end_fill()
  812. set_start(-44.24, -37.54, 2.5)
  813. setheading(351.5)
  814. begin_fill()
  815. right(177)
  816. right_rotate(2, 3, 14)
  817. right_rotate(1, 3, 7)
  818. left(65)
  819. left_rotate(4, 7, 10)
  820. left_rotate(3, 6, 10)
  821. left_rotate(1, 0, 2)
  822. left(128)
  823. right_rotate(6, 7, 6.1)
  824. right_rotate(2, 7, 6.1)
  825. left(125)
  826. right_rotate(5, 4, 11)
  827. fillcolor('#FF0000')
  828. end_fill()
  829. set_start(-44.24, -37.54, 2.5)
  830. setheading(351.5)
  831. begin_fill()
  832. right(177)
  833. right_rotate(1, 3, 14)
  834. right_rotate(1, 3, 8)
  835. left(92)
  836. left_rotate(4, 8, 7)
  837. right(10)
  838. right_rotate(4, 3, 6)
  839. goto(-59.29, -87.30)
  840. setheading(2.5)
  841. right_rotate(2, 7, 6.1)
  842. left(125)
  843. right_rotate(5, 4, 11)
  844. fillcolor('#228B22')
  845. end_fill()
  846. def draw_tail():
  847. set_start(53, -74, 2.4, c='#87481f')
  848. begin_fill()
  849. setheading(26)
  850. right_rotate(5, 16, 1.3)
  851. right_rotate(1, 8, 8)
  852. right_rotate(1, 8, 4)
  853. left(60)
  854. right_rotate(1, 3, 3)
  855. pencolor(COLOR)
  856. forward(5)
  857. right_rotate(4, 3, 8)
  858. left_rotate(3, 3, 7)
  859. left_rotate(2, 5, 3)
  860. left_rotate(5, 6, 6)
  861. left_rotate(3, 8, 7)
  862. left_rotate(5, 12, 6)
  863. left_rotate(5, 10, 6)
  864. left_rotate(5, 15, 2)
  865. left_rotate(2, 20, 2)
  866. left_rotate(3, 10, 3)
  867. right_rotate(2, 13, 5)
  868. right_rotate(2, 20, 6)
  869. right_rotate(2, 12, 6)
  870. right_rotate(5, 7.5, 5)
  871. right_rotate(6, 3, 4)
  872. left_rotate(4, 2, 8.5)
  873. fillcolor('#fdb933')
  874. end_fill()
  875. set_start(53, -74, 2.4, c='#87481f')
  876. begin_fill()
  877. setheading(26)
  878. right_rotate(5, 16, 1.3)
  879. right_rotate(1, 8, 8)
  880. right_rotate(1, 8, 3)
  881. left(60)
  882. right_rotate(1, 3, 2)
  883. pencolor('#130c0e')
  884. left_rotate(3, 25, 2)
  885. left_rotate(3, 5, 1.8)
  886. left_rotate(1, 78, 8.5)
  887. fillcolor('#130c0e')
  888. end_fill()
  889. set_start(83, -81, 1, c='#130c0e')
  890. begin_fill()
  891. left(140)
  892. right_rotate(5, 8, 2)
  893. left_rotate(1, 105, 5)
  894. right_rotate(2, 3, 5.5)
  895. left(50)
  896. left_rotate(3, 15, 4.1)
  897. fillcolor('#130c0e')
  898. end_fill()
  899. set_start(109, -89, 1, c='#130c0e')
  900. begin_fill()
  901. left(150)
  902. right_rotate(3, 5, 2)
  903. right_rotate(4, 15, 2)
  904. left_rotate(1, 125, 6)
  905. left_rotate(2, 3, 7)
  906. left(85)
  907. left_rotate(3, 15, 6.05)
  908. left(68)
  909. right_rotate(3, 5, 5)
  910. fillcolor('#130c0e')
  911. end_fill()
  912. set_start(132, -88, 1, c='#130c0e')
  913. begin_fill()
  914. left(180)
  915. right_rotate(5, 10, 4.1)
  916. left_rotate(1, 100, 6)
  917. left_rotate(2, 5, 7)
  918. left(75)
  919. left_rotate(5, 10, 5)
  920. left(75)
  921. right_rotate(3, 8, 4.5)
  922. fillcolor('#130c0e')
  923. end_fill()
  924. set_start(150, -71, 1, c='#130c0e')
  925. begin_fill()
  926. right(140)
  927. right_rotate(5, 15, 5.8)
  928. left_rotate(1, 130, 6)
  929. left_rotate(2, 10, 5)
  930. left(30)
  931. left_rotate(5, 15, 5.6)
  932. left(81)
  933. right_rotate(3, 8, 3)
  934. fillcolor('#130c0e')
  935. end_fill()
  936. set_start(147, -51, 1, c='#130c0e')
  937. begin_fill()
  938. right(125)
  939. right_rotate(5, 10, 4)
  940. left(145)
  941. left_rotate(2, 10, 6.5)
  942. left_rotate(6, 14, 2)
  943. left_rotate(4, 22, 2)
  944. fillcolor('#130c0e')
  945. end_fill()
  946. def draw_drum():
  947. set_start(-136, -12, 2, c='#87481f')
  948. begin_fill()
  949. right_rotate(1, 78, 17)
  950. right_rotate(5, 30, 1.2)
  951. right_rotate(1, 30, 17)
  952. fillcolor('#FF0000')
  953. end_fill()
  954. set_start(-140, -2, 2, c='#87481f')
  955. begin_fill()
  956. left_rotate(1, 108, 10)
  957. right_rotate(1, 90, 4)
  958. left_rotate(5, 16, 7)
  959. left_rotate(5, 19, 6.5)
  960. forward(4)
  961. left_rotate(5, 18, 7.5)
  962. left_rotate(5, 18, 6.1)
  963. left_rotate(1, 180, 3)
  964. left_rotate(1, 95, 10)
  965. fillcolor('#FF0000')
  966. end_fill()
  967. set_start(-156.34, 48.19, 1, c='#87481f')
  968. setheading(199)
  969. left(12)
  970. left_rotate(10, 14.5, 5.8)
  971. set_start(-140, 12, 1, c='#87481f')
  972. setheading(20)
  973. begin_fill()
  974. left_rotate(5, 14, 5.2)
  975. left_rotate(3, 15, 4.5)
  976. left_rotate(5, 18, 5)
  977. left_rotate(5, 16, 5.5)
  978. left_rotate(3, 18, 5)
  979. fillcolor('#fffffb')
  980. end_fill()
  981. set_start(-143, 14, 2.5, c='#FF0000')
  982. left_rotate(1, 117, 17)
  983. left_rotate(1, 90, 9)
  984. left(90)
  985. left_rotate(3, 5, 3.5)
  986. set_start(-146.8, 14, 2.5, c='#FF0000')
  987. left_rotate(1, 120, 14)
  988. set_start(-150, 34, 2.5, c='#FF0000')
  989. left_rotate(1, 120, 8.5)
  990. left(100)
  991. left_rotate(3, 17, 4)
  992. set_start(-140, 16, 2.5, c='#FF0000')
  993. left_rotate(1, 115, 14)
  994. right_rotate(1, 90, 13)
  995. right(90)
  996. right_rotate(4, 16, 4.5)
  997. set_start(-136, 18, 2.4, c='#FF0000')
  998. left_rotate(1, 112, 12)
  999. set_start(-142, 24, 2.5, c='#FF0000')
  1000. left_rotate(1, 35, 10)
  1001. set_start(-145, 32, 2.5, c='#FF0000')
  1002. left_rotate(1, 115, 6)
  1003. right_rotate(1, 85, 10)
  1004. right(40)
  1005. right_rotate(3, 18, 2)
  1006. right_rotate(1, 95, 10)
  1007. set_start(-149, 44, 2.5, c='#FF0000')
  1008. left(60)
  1009. right_rotate(3, 22, 3)
  1010. set_start(-166, 20, 2.4)
  1011. right(100)
  1012. right_rotate(4, 32, 3)
  1013. right_rotate(2, 12, 3.5)
  1014. left_rotate(2, 10, 4)
  1015. left_rotate(4, 25, 2.5)
  1016. set_start(-196, 35, 2.4)
  1017. draw_circle(3.5, COLOR, '#FF0000')
  1018. set_start(-127, 38, 2.4)
  1019. left(60)
  1020. right_rotate(4, 32, 3)
  1021. right_rotate(2, 12, 3.5)
  1022. left_rotate(6, 28, 2)
  1023. left_rotate(3, 15, 2)
  1024. set_start(-115, 33, 2.4)
  1025. draw_circle(3.5, COLOR, '#FF0000')
  1026. if __name__ == '__main__':
  1027. setup(420, 400, 150, 150)
  1028. screensize(400, 380, '#FFE4E1')
  1029. time.sleep(3)
  1030. draw_head()
  1031. draw_face()
  1032. draw_eye()
  1033. draw_nose()
  1034. draw_mouth()
  1035. draw_ear()
  1036. draw_cap()
  1037. draw_brow()
  1038. draw_shadow()
  1039. draw_body()
  1040. draw_moustache()
  1041. draw_left_hand()
  1042. draw_right_hand()
  1043. draw_clothes()
  1044. draw_tail()
  1045. draw_drum()
  1046. set_start(1000, 1000, 2.5)
  1047. done()

二、福兔

十二生肖兔的象征,兔是十二生肖之一,地支的第四位。“兔”在中国是一个美好的字眼,寄托了人们美好的希,兔外表温顺可爱,天真活泼、自由好动,下面是十二生肖兔的象征的内容。

代码:

  1. import turtle
  2. import math
  3. #设置画布尺寸
  4. turtle.screensize(400, 300, "#FFE4C4")
  5. turtle.pensize(1)
  6. turtle.pencolor("black")
  7. turtle.speed(5)
  8. turtle.hideturtle()
  9. #画兔头
  10. turtle.fillcolor("white")
  11. turtle.begin_fill()
  12. turtle.penup()
  13. turtle.goto(0, 80)
  14. turtle.seth(0)
  15. turtle.pendown()
  16. turtle.circle(-60, 90)
  17. turtle.left(90)
  18. turtle.circle(-25, 160)
  19. turtle.circle(-200, 20)
  20. turtle.goto(0, -40)
  21. turtle.penup()
  22. turtle.goto(0, 80)
  23. turtle.seth(180)
  24. turtle.pendown()
  25. turtle.circle(60, 90)
  26. turtle.right(90)
  27. turtle.circle(25, 160)
  28. turtle.circle(200, 20)
  29. turtle.goto(0, -40)
  30. turtle.end_fill()
  31. #画兔嘴巴
  32. turtle.penup()
  33. turtle.goto(0, 0)
  34. turtle.right(60)
  35. turtle.pendown()
  36. turtle.circle(10, 135)
  37. turtle.penup()
  38. turtle.goto(0, 0)
  39. turtle.seth(0)
  40. turtle.pendown()
  41. turtle.right(120)
  42. turtle.circle(-10, 135)
  43. turtle.penup()
  44. turtle.seth(0)
  45. turtle.goto(-10, -5)
  46. turtle.pendown()
  47. turtle.right(90)
  48. turtle.fillcolor("pink")
  49. turtle.begin_fill()
  50. turtle.forward(5)
  51. turtle.circle(10, 180)
  52. turtle.forward(5)
  53. #画兔鼻子
  54. turtle.penup()
  55. turtle.seth(0)
  56. turtle.goto(0, 0)
  57. turtle.pendown()
  58. turtle.circle(3)
  59. turtle.end_fill()
  60. #画兔眼睛
  61. #左眼
  62. turtle.penup()
  63. turtle.seth(0)
  64. turtle.goto(-35, 5)
  65. turtle.pendown()
  66. turtle.fillcolor("white")
  67. turtle.begin_fill()
  68. turtle.circle(12)
  69. turtle.end_fill()
  70. turtle.fillcolor("black")
  71. turtle.begin_fill()
  72. turtle.circle(10)
  73. turtle.end_fill()
  74. #右眼
  75. turtle.penup()
  76. turtle.seth(0)
  77. turtle.goto(35, 5)
  78. turtle.pendown()
  79. turtle.fillcolor("white")
  80. turtle.begin_fill()
  81. turtle.circle(12)
  82. turtle.end_fill()
  83. turtle.fillcolor("black")
  84. turtle.begin_fill()
  85. turtle.circle(10)
  86. turtle.end_fill()
  87. #画兔耳朵
  88. turtle.penup() # 左耳
  89. turtle.seth(90)
  90. x1 = -5
  91. y1 = math.sqrt(80**2-x1**2)
  92. x2 = -20
  93. y2 = math.sqrt(80**2-x2**2)
  94. x3 = -10
  95. y3 = math.sqrt(80**2-x3**2)
  96. x4 = -15
  97. y4 = math.sqrt(80**2-x4**2)
  98. turtle.goto(x1, y1)
  99. turtle.pendown()
  100. turtle.fillcolor("white")
  101. turtle.begin_fill()
  102. turtle.circle(100, 30)
  103. turtle.circle(15, 180)
  104. turtle.goto(x2, y2)
  105. turtle.end_fill()
  106. turtle.fillcolor("pink") # 左耳上色
  107. turtle.penup()
  108. turtle.seth(90)
  109. turtle.goto(x3, y4)
  110. turtle.pendown()
  111. turtle.begin_fill()
  112. turtle.circle(100, 20)
  113. turtle.circle(8, 180)
  114. turtle.goto(x4, y4)
  115. turtle.end_fill()
  116. turtle.penup() # 右耳
  117. turtle.seth(90)
  118. x5 = 5
  119. y5 = math.sqrt(80**2-x5**2)
  120. x6 = 20
  121. y6 = math.sqrt(80**2-x6**2)
  122. x7 = 10
  123. y7 = math.sqrt(80**2-x7**2)
  124. x8 = 15
  125. y8 = math.sqrt(80**2-x8**2)
  126. turtle.goto(x5, y5)
  127. turtle.pendown()
  128. turtle.fillcolor("white")
  129. turtle.begin_fill()
  130. turtle.circle(-100, 30)
  131. turtle.circle(-15, 180)
  132. turtle.goto(x6, y6)
  133. turtle.end_fill()
  134. turtle.fillcolor("pink") # 右耳上色
  135. turtle.penup()
  136. turtle.seth(90)
  137. turtle.goto(x7, y7)
  138. turtle.pendown()
  139. turtle.begin_fill()
  140. turtle.circle(-100, 20)
  141. turtle.circle(-8, 180)
  142. turtle.goto(x8, y8)
  143. turtle.end_fill()
  144. #画兔身
  145. turtle.fillcolor("white")
  146. turtle.penup() # 左边
  147. turtle.seth(180)
  148. turtle.goto(0, -40)
  149. turtle.begin_fill()
  150. turtle.pendown()
  151. turtle.circle(-200, 15)
  152. turtle.seth(-135)
  153. turtle.circle(100, 25)
  154. turtle.circle(60, 90)
  155. turtle.goto(0, -150)
  156. turtle.penup() # 右边
  157. turtle.seth(0)
  158. turtle.goto(0, -40)
  159. turtle.pendown()
  160. turtle.circle(200, 15)
  161. turtle.seth(-45)
  162. turtle.circle(-100, 25)
  163. turtle.circle(-60, 90)
  164. turtle.goto(0, -150)
  165. turtle.end_fill()
  166. #画兔手和脚
  167. turtle.fillcolor("white")
  168. turtle.penup() # 左手
  169. turtle.seth(0)
  170. turtle.goto(-50, -40)
  171. turtle.begin_fill()
  172. turtle.pendown()
  173. turtle.forward(8)
  174. turtle.circle(-15, 180)
  175. turtle.forward(8)
  176. turtle.circle(-15, 180)
  177. turtle.penup() # 右手
  178. turtle.seth(180)
  179. turtle.goto(50, -40)
  180. turtle.pendown()
  181. turtle.forward(8)
  182. turtle.circle(15, 180)
  183. turtle.forward(8)
  184. turtle.circle(15, 180)
  185. turtle.end_fill()
  186. turtle.fillcolor("white")
  187. turtle.penup() # 左脚
  188. turtle.seth(135)
  189. turtle.goto(-50, -150)
  190. turtle.begin_fill()
  191. turtle.pendown()
  192. turtle.forward(12)
  193. turtle.circle(-15, 180)
  194. turtle.forward(12)
  195. turtle.circle(-15, 180)
  196. turtle.penup() # 右脚
  197. turtle.seth(45)
  198. turtle.goto(50, -150)
  199. turtle.pendown()
  200. turtle.forward(12)
  201. turtle.circle(15, 180)
  202. turtle.forward(12)
  203. turtle.circle(15, 180)
  204. turtle.end_fill()
  205. #福字
  206. turtle.fillcolor("#CD4F39") # 红纸
  207. turtle.penup()
  208. turtle.seth(-45)
  209. turtle.begin_fill()
  210. turtle.goto(0, -30)
  211. turtle.pendown()
  212. i = 1
  213. for i in range(4):
  214. turtle.forward(90)
  215. turtle.right(90)
  216. i = i+1
  217. turtle.end_fill()
  218. turtle.pencolor("#FFDE00") # 金字
  219. turtle.pensize(6)
  220. turtle.penup() # 点
  221. turtle.goto(-21, -70)
  222. turtle.seth(-60)
  223. turtle.pendown()
  224. turtle.forward(8)
  225. turtle.penup() # 横折
  226. turtle.goto(-30, -80)
  227. turtle.seth(0)
  228. turtle.pendown()
  229. turtle.forward(20)
  230. turtle.right(145)
  231. turtle.forward(35)
  232. turtle.penup() # 竖
  233. turtle.goto(-20, -90)
  234. turtle.seth(-90)
  235. turtle.pendown()
  236. turtle.forward(38)
  237. turtle.penup() # 点
  238. turtle.goto(-20, -90)
  239. turtle.seth(-45)
  240. turtle.pendown()
  241. turtle.forward(10)
  242. turtle.penup() # 横
  243. turtle.goto(0, -75)
  244. turtle.seth(0)
  245. turtle.pendown()
  246. turtle.forward(25)
  247. turtle.penup() # 口
  248. turtle.goto(2, -85)
  249. turtle.seth(-90)
  250. turtle.pendown()
  251. turtle.forward(10)
  252. turtle.penup()
  253. turtle.goto(2, -85)
  254. turtle.seth(0)
  255. turtle.pendown()
  256. turtle.forward(18)
  257. turtle.right(100)
  258. turtle.forward(10)
  259. turtle.penup()
  260. turtle.goto(2, -95)
  261. turtle.seth(0)
  262. turtle.pendown()
  263. turtle.forward(15)
  264. turtle.penup() # 田
  265. turtle.goto(-3, -105)
  266. turtle.seth(-90)
  267. turtle.pendown()
  268. turtle.forward(20)
  269. turtle.penup()
  270. turtle.goto(-3, -105)
  271. turtle.seth(0)
  272. turtle.pendown()
  273. turtle.forward(30)
  274. turtle.right(100)
  275. turtle.forward(22)
  276. turtle.penup()
  277. turtle.goto(-3, -115)
  278. turtle.seth(0)
  279. turtle.pendown()
  280. turtle.forward(25)
  281. turtle.penup()
  282. turtle.goto(10, -105)
  283. turtle.seth(-90)
  284. turtle.pendown()
  285. turtle.forward(15)
  286. turtle.penup()
  287. turtle.goto(0, -125)
  288. turtle.seth(0)
  289. turtle.pendown()
  290. turtle.forward(25)
  291. turtle.done()

总结

今天就到这里了。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/127417
推荐阅读
相关标签
  

闽ICP备14008679号