{"id":350,"date":"2026-02-03T19:41:56","date_gmt":"2026-02-03T11:41:56","guid":{"rendered":"http:\/\/lhy.cpolar.top\/?p=350"},"modified":"2026-02-03T19:41:56","modified_gmt":"2026-02-03T11:41:56","slug":"turtle%e5%ba%93-%e6%a1%88%e4%be%8b13%ef%bc%9a%e7%94%bb%e5%b0%8f%e7%8c%aa%e4%bd%a9%e5%a5%87","status":"publish","type":"post","link":"http:\/\/lhy.cpolar.top\/?p=350","title":{"rendered":"turtle\u5e93\u2014\u2014\u6848\u4f8b13\uff1a\u753b\u5c0f\u732a\u4f69\u5947"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/lhy.cpolar.top\/wp-content\/uploads\/2026\/02\/%E7%94%BB%E5%B0%8F%E7%8C%AA%E4%BD%A9%E5%A5%87.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"http:\/\/lhy.cpolar.top\/wp-content\/uploads\/2026\/02\/%E7%94%BB%E5%B0%8F%E7%8C%AA%E4%BD%A9%E5%A5%87.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\u5f53\u524d\u56fe\u7247\u6ca1\u6709\u66ff\u4ee3\u6587\u5b57\u3002\u6587\u4ef6\u540d\u4e3a\uff1a%e7%94%bb%e5%b0%8f%e7%8c%aa%e4%bd%a9%e5%a5%87\" \/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5bfc\u5165\u7ed8\u56fe\u5e93\nimport turtle as t\n\n# \u753b\u5e03\u4e0e\u8272\u8c03\u8bbe\u5b9a\nt.title(\"\u5c0f\u732a\u4f69\u5947\")\nt.speed(5)\nt.pensize(4)\nt.hideturtle()\nt.colormode(255)\nt.color((255,155,192),\"pink\")\nt.setup(840,500)\nt.speed(10)\n\n# \u7ed8\u5236\u9f3b\u5b50\nt.pu()\nt.goto(-100,100)\nt.pd()\nt.seth(-30)\nt.begin_fill()\na = 0.4\nfor i in range(120):\n   if 0 &lt;= i &lt; 30 or 60 &lt;= i &lt; 90:\n       a=a+0.08\n       t.lt(3) # \u5411\u5de6\u8f6c3\u5ea6\n       t.fd(a) # \u5411\u524d\u8d70a\u7684\u6b65\u957f\n   else:\n       a=a-0.08\n       t.lt(3)\n       t.fd(a)\nt.end_fill()\n\nt.pu()\nt.seth(90)\nt.fd(25)\nt.seth(0)\nt.fd(10)\nt.pd()\nt.pencolor(255,155,192)\nt.seth(10)\nt.begin_fill()\nt.circle(5)\nt.color(160,82,45)\nt.end_fill()\n\nt.pu()\nt.seth(0)\nt.fd(20)\nt.pd()\nt.pencolor(255,155,192)\nt.seth(10)\nt.begin_fill()\nt.circle(5)\nt.color(160,82,45)\nt.end_fill()\n#\u7ed8\u5236\u5934\u90e8\nt.color((255,155,192),\"pink\")\nt.pu()\nt.seth(90)\nt.fd(41)\nt.seth(0)\nt.fd(0)\nt.pd()\nt.begin_fill()\nt.seth(180)\nt.circle(300,-30)\nt.circle(100,-60)\nt.circle(80,-100)\nt.circle(150,-20)\nt.circle(60,-95)\nt.seth(161)\nt.circle(-300,15)\nt.pu()\nt.goto(-100,100)\nt.pd()\nt.seth(-30)\na=0.4\nfor i in range(60):\n   if 0&lt;=i&lt;30 or 60&lt;=i&lt;90:\n       a=a+0.08\n       t.lt(3) #\u5411\u5de6\u8f6c3\u5ea6\n       t.fd(a) #\u5411\u524d\u8d70a\u7684\u6b65\u957f\n   else:\n       a=a-0.08\n       t.lt(3)\n       t.fd(a)\nt.end_fill()\n#\u7ed8\u5236\u8033\u6735\nt.color((255,155,192),\"pink\")\nt.pu()\nt.seth(90)\nt.fd(-7)\nt.seth(0)\nt.fd(70)\nt.pd()\nt.begin_fill()\nt.seth(100)\nt.circle(-50,50)\nt.circle(-10,120)\nt.circle(-50,54)\nt.end_fill()\n\nt.pu()\nt.seth(90)\nt.fd(-12)\nt.seth(0)\nt.fd(30)\nt.pd()\nt.begin_fill()\nt.seth(100)\nt.circle(-50,50)\nt.circle(-10,120)\nt.circle(-50,56)\nt.end_fill()\n#\u7ed8\u5236\u773c\u775b\nt.color((255,155,192),\"white\")\nt.pu()\nt.seth(90)\nt.fd(-20)\nt.seth(0)\nt.fd(-95)\nt.pd()\nt.begin_fill()\nt.circle(15)\nt.end_fill()\n\nt.color(\"black\")\nt.pu()\nt.seth(90)\nt.fd(12)\nt.seth(0)\nt.fd(-3)\nt.pd()\nt.begin_fill()\nt.circle(3)\nt.end_fill()\n\nt.color((255,155,192),\"white\")\nt.pu()\nt.seth(90)\nt.fd(-25)\nt.seth(0)\nt.fd(40)\nt.pd()\nt.begin_fill()\nt.circle(15)\nt.end_fill()\n\nt.color(\"black\")\nt.pu()\nt.seth(90)\nt.fd(12)\nt.seth(0)\nt.fd(-3)\nt.pd()\nt.begin_fill()\nt.circle(3)\nt.end_fill()\n#\u7ed8\u5236\u4e0b\u5df4\nt.color((255,155,192))\nt.pu()\nt.seth(90)\nt.fd(-95)\nt.seth(0)\nt.fd(65)\nt.pd()\nt.begin_fill()\nt.circle(30)\nt.end_fill()\n#\u7ed8\u5236\u5634\u5df4\nt.color(239,69,19)\nt.pu()\nt.seth(90)\nt.fd(15)\nt.seth(0)\nt.fd(-100)\nt.pd()\nt.seth(-80)\nt.circle(30,40)\nt.circle(40,80)\n#\u7ed8\u5236\u8eab\u4f53\nt.color(\"red\",(255,99,71))\nt.pu()\nt.seth(90)\nt.fd(-20)\nt.seth(0)\nt.fd(-78)\nt.pd()\nt.begin_fill()\nt.seth(-130)\nt.circle(100,10)\nt.circle(300,30)\nt.seth(0)\nt.fd(230)\nt.seth(90)\nt.circle(300,30)\nt.circle(100,3)\nt.color((255,155,192),(255,100,100))\nt.seth(-135)\nt.circle(-80,63)\nt.circle(-150,24)\nt.end_fill()\n#\u7ed8\u5236\u53cc\u624b\nt.color((255,155,192))\nt.pu()\nt.seth(90)\nt.fd(-40)\nt.seth(0)\nt.fd(-27)\nt.pd()\nt.seth(-160)\nt.circle(300,15)\nt.pu()\nt.seth(90)\nt.fd(15)\nt.seth(0)\nt.fd(0)\nt.pd()\nt.seth(-10)\nt.circle(-20,90)\n\nt.pu()\nt.seth(90)\nt.fd(30)\nt.seth(0)\nt.fd(237)\nt.pd()\nt.seth(-20)\nt.circle(-300,15)\nt.pu()\nt.seth(90)\nt.fd(20)\nt.seth(0)\nt.fd(0)\nt.pd()\nt.seth(-170)\nt.circle(20,90)\n#\u7ed8\u5236\u53cc\u811a\nt.pensize(10)\nt.color((240,128,128))\nt.pu()\nt.seth(90)\nt.fd(-75)\nt.seth(0)\nt.fd(-180)\nt.pd()\nt.seth(-90)\nt.fd(40)\nt.seth(-180)\nt.color(\"black\")\nt.pensize(15)\nt.fd(20)\n\nt.pensize(10)\nt.color((240,128,128))\nt.pu()\nt.seth(90)\nt.fd(40)\nt.seth(0)\nt.fd(90)\nt.pd()\nt.seth(-90)\nt.fd(40)\nt.seth(-180)\nt.color(\"black\")\nt.pensize(15)\nt.fd(20)\n#\u7ed8\u5236\u5c3e\u5df4\nt.pensize(4)\nt.color((255,155,192))\nt.pu()\nt.seth(90)\nt.fd(70)\nt.seth(0)\nt.fd(95)\nt.pd()\nt.seth(0)\nt.circle(70,20)\nt.circle(10,330)\nt.circle(70,30)\n# input()\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":7,"featured_media":351,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[8,19,20],"class_list":["post-350","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tyjs","tag-python","tag-turtle","tag-20"],"_links":{"self":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=350"}],"version-history":[{"count":1,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/350\/revisions"}],"predecessor-version":[{"id":352,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/350\/revisions\/352"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/media\/351"}],"wp:attachment":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=350"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}