{"id":5261,"date":"2022-04-02T18:45:35","date_gmt":"2022-04-02T10:45:35","guid":{"rendered":"https:\/\/egonlin.com\/?p=5261"},"modified":"2022-04-26T14:26:15","modified_gmt":"2022-04-26T06:26:15","slug":"09-05-%e5%ae%9e%e4%be%8b16-%e7%8e%ab%e7%91%b0%e8%8a%b1%e7%bb%98%e5%88%b6","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=5261","title":{"rendered":"09-05 \u5b9e\u4f8b16-\u73ab\u7470\u82b1\u7ed8\u5236"},"content":{"rendered":"<h1>\u4e00\u3001&quot;\u73ab\u7470\u82b1\u7ed8\u5236&quot;\u95ee\u9898\u5206\u6790<\/h1>\n<h2>1.1 \u95ee\u9898\u5206\u6790<\/h2>\n<p>\u73ab\u7470\u82b1\u7ed8\u5236<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2022\/04\/\u5b9e\u4f8b16-\u73ab\u7470\u82b1\u7ed8\u52361.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2022\/04\/\u5b9e\u4f8b16-\u73ab\u7470\u82b1\u7ed8\u52361.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<ul>\n<li>\u9700\u6c42\uff1a\u7528Python\u7ed8\u5236\u4e00\u6735\u73ab\u7470\u82b1\uff0c\u732e\u7ed9\u6240\u601d\u6240\u5ff5<\/li>\n<li>\u8f93\u5165\uff1a\u4f60\u7684\u60f3\u8c61\u529b\uff01<\/li>\n<li>\u8f93\u51fa\uff1a\u73ab\u7470\u82b1<\/li>\n<li>\u7ed8\u5236\u673a\u7406\uff1aturtle\u57fa\u672c\u56fe\u5f62\u7ed8\u5236<\/li>\n<li>\u7ed8\u5236\u601d\u60f3\uff1a\u56e0\u4eba\u800c\u5f02<\/li>\n<li>\u601d\u60f3\u6709\u591a\u5927\u3001\u4e16\u754c\u5c31\u6709\u591a\u5927<\/li>\n<\/ul>\n<h1>\u4e8c\u3001&quot;\u73ab\u7470\u82b1\u7ed8\u5236&quot;\u5b9e\u4f8b\u5c55\u793a<\/h1>\n<h2>2.1 \u5b9a\u4e49\u4e00\u4e2a\u66f2\u7ebf\u7ed8\u5236\u51fd\u6570<\/h2>\n<pre><code class=\"language-python\">def DegreeCurve(n, r, d=1):\n    for i in range(n):\n        t.left(d)\n        t.circle(r, abs(d))<\/code><\/pre>\n<h2>2.2 \u521d\u59cb\u4f4d\u7f6e\u8bbe\u5b9a<\/h2>\n<pre><code class=\"language-python\">t.begin_fill()\ns = 0.2  ##  size\nt.setup(450 * 5 * s, 750 * 5 * s)\nt.pencolor(&quot;black&quot;)\nt.fillcolor(&quot;red&quot;)\nt.speed(100)\nt.penup()\nt.goto(0, 900 * s)\nt.pendown()<\/code><\/pre>\n<h2>2.3 \u7ed8\u5236\u82b1\u6735\u5f62\u72b6<\/h2>\n<pre><code class=\"language-python\">t.begin_fill()\nt.circle(200 * s, 30)\nDegreeCurve(60, 50 * s)\nt.circle(200 * s, 30)\nDegreeCurve(4, 100 * s)\nt.circle(200 * s, 50)\nDegreeCurve(50, 50 * s)\nt.circle(350 * s, 65)\nDegreeCurve(40, 70 * s)\nt.circle(150 * s, 50)\nDegreeCurve(20, 50 * s, -1)\nt.circle(400 * s, 60)\nDegreeCurve(18, 50 * s)\nt.fd(250 * s)\nt.right(150)\nt.circle(-500 * s, 12)\nt.left(140)\nt.circle(550 * s, 110)\nt.left(27)\nt.circle(650 * s, 100)\nt.left(130)\nt.circle(-300 * s, 20)\nt.right(123)\nt.circle(220 * s, 57)\nt.end_fill()<\/code><\/pre>\n<h2>2.4 \u7ed8\u5236\u82b1\u679d\u5f62\u72b6<\/h2>\n<pre><code class=\"language-python\">t.left(120)\nt.fd(280 * s)\nt.left(115)\nt.circle(300 * s, 33)\nt.left(180)\nt.circle(-300 * s, 33)\nDegreeCurve(70, 225 * s, -1)\nt.circle(350 * s, 104)\nt.left(90)\nt.circle(200 * s, 105)\nt.circle(-500 * s, 63)\nt.penup()\nt.goto(170 * s, -30 * s)\nt.pendown()\nt.left(160)\nDegreeCurve(20, 2500 * s)\nDegreeCurve(220, 250 * s, -1)<\/code><\/pre>\n<h2>2.5 \u7ed8\u5236\u4e00\u4e2a\u7eff\u8272\u53f6\u5b50<\/h2>\n<pre><code class=\"language-python\">t.fillcolor(&#039;green&#039;)\nt.penup()\nt.goto(670 * s, -180 * s)\nt.pendown()\nt.right(140)\nt.begin_fill()\nt.circle(300 * s, 120)\nt.left(60)\nt.circle(300 * s, 120)\nt.end_fill()\nt.penup()\nt.goto(180 * s, -550 * s)\nt.pendown()\nt.right(85)\nt.circle(600 * s, 40)<\/code><\/pre>\n<h2>2.6 \u7ed8\u5236\u53e6\u4e00\u4e2a\u7eff\u8272\u53f6\u5b50<\/h2>\n<div id=\"rml_readmorelogin_placeholder\" style=\"position:relative;\"><div id=\"rml_fade_content\" style=\"position: absolute;\r\ntop:-10em;\r\nwidth:100%;\r\nheight:10em;\r\nbackground: -webkit-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -moz-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -o-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -ms-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\"><\/div><div class=\"wpf-controller aru_rml_from_in_post\" style=\"background-color:#eeeeee;border:5px solid #cce6ff;\" id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><h2 id=\"Header\">\u67e5\u770b\u66f4\u591a<\/h2><div id=\"Message\"><p>\u8054\u7cfb\u7ba1\u7406\u5458\u5fae\u4fe1tutu19192010\uff0c\u6ce8\u518c\u8d26\u53f7<\/p>\n<\/div><div id=\"StatusBarHeader\"><\/div><form id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><input name=\"post_id\" value=\"5261\" type=\"hidden\"\/><input name=\"_init_callback\" value=\"InitLogin\" type=\"hidden\"\/><input name=\"post_id\" value=\"5261\" type=\"hidden\"\/><input name=\"rt_ype\" value=\"1\" type=\"hidden\"\/><input name=\"nonce\" value=\"90e17a71ef\" type=\"hidden\"\/><input name=\"_wpnonce\" value=\"7fd776cc80\" type=\"hidden\"\/><input name=\"_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_proxy_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_view\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginView\" type=\"hidden\"\/><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\" width=\"400px\"><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Username:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"username\" value=\"\" type=\"text\"\/><\/td><\/tr><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Password:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"password\" value=\"\" type=\"password\"\/><\/td><\/tr><\/tbody><\/table><p class=\"wpf-table-placeholder submit\"><button class=\"wp_plugin_framework_ajax_button\" type=\"button\" style=\"background-color:#4D90FE;;color:#ffffff;;border:1px solid #3079ed;\" name=\"_event\" value=\"ButtonLogin\">Log in<\/button><\/p><\/td><td class=\"wpf-table-placeholder-input\"><\/td><\/tr><\/tbody><\/table><\/form><div id=\"ButtonStartRegister\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=register\">Register<\/a><\/div><div id=\"Link1\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=lostpassword\">Forgotten username or password?<\/a><\/div><div id=\"StatusBarFooter\"><\/div><\/div><\/div><div id=aru_remaining_content><\/div>","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001&quot;\u73ab\u7470\u82b1\u7ed8\u5236&quot;\u95ee\u9898\u5206\u6790 1.1 \u95ee\u9898\u5206\u6790 \u73ab\u7470\u82b1\u7ed8\u5236 \u9700\u6c42\uff1a\u7528Python\u7ed8\u5236\u4e00\u6735\u73ab\u7470 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":5263,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[371,382],"tags":[],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/5261"}],"collection":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5261"}],"version-history":[{"count":0,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/5261\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/media\/5263"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}