{"id":26838,"date":"2024-11-24T17:38:26","date_gmt":"2024-11-24T09:38:26","guid":{"rendered":"https:\/\/fwq.ai\/blog\/26838\/"},"modified":"2024-11-24T17:38:26","modified_gmt":"2024-11-24T09:38:26","slug":"%e6%97%8b%e8%bd%ac%e9%95%bf%e6%96%b9%e5%bd%a2%e5%90%8e%ef%bc%8c%e5%a6%82%e4%bd%95%e8%ae%a1%e7%ae%97%e5%85%b6%e7%9b%b8%e5%af%b9%e4%ba%8e%e7%94%bb%e5%b8%83%e5%b7%a6%e4%b8%8a%e8%a7%92%e7%9a%84%e8%bd%b4-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/26838\/","title":{"rendered":"\u65cb\u8f6c\u957f\u65b9\u5f62\u540e\uff0c\u5982\u4f55\u8ba1\u7b97\u5176\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684\u8f74\u8ddd\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173111109075927.jpg\" class=\"aligncenter\" title=\"\u65cb\u8f6c\u957f\u65b9\u5f62\u540e\uff0c\u5982\u4f55\u8ba1\u7b97\u5176\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684\u8f74\u8ddd\uff1f\u63d2\u56fe\" alt=\"\u65cb\u8f6c\u957f\u65b9\u5f62\u540e\uff0c\u5982\u4f55\u8ba1\u7b97\u5176\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684\u8f74\u8ddd\uff1f\u63d2\u56fe\" \/><\/p>\n<h2>\u7ed8\u5236\u957f\u65b9\u5f62\u5e76\u65cb\u8f6c\uff0c\u8ba1\u7b97\u65cb\u8f6c\u540e\u8f74\u8ddd<\/h2>\n<p>\u5728\u62e5\u6709 1920\u00d71080 \u753b\u5e03\u4e2d\uff0c\u653e\u7f6e\u4e00\u4e2a\u5bbd\u9ad8\u4e3a 200\u00d720 \u7684\u957f\u65b9\u5f62\uff0c\u5176\u5750\u6807\u4f4d\u4e8e (100, 100)\u3002\u5f53\u4ee5\u4efb\u610f\u89d2\u5ea6\u65cb\u8f6c\u957f\u65b9\u5f62\u65f6\uff0c\u5982\u4f55\u8ba1\u7b97\u5b83\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684 x\u3001y \u8f74\u8ddd\uff1f<\/p>\n<p>\u4ee5\u4e0b\u4ee3\u7801\u63d0\u4f9b\u4e86\u4e00\u4e2a\u8ba1\u7b97\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u8f74\u8ddd\u7684\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<pre>const x = 200;\nconst y = 90;\nconst w = 200;\nconst h = 20;\nconst r = 80;\n\nconst x1 = x + ((w \/ 2) - (w \/ 2) * math.cos(r * math.pi \/ 180));\nconst y1 = (y + (h \/ 2)) - (w \/ 2) * math.sin(r * math.pi \/ 180);<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5176\u4e2d\uff1a<\/p>\n<ul>\n<li>x \u548c y \u4e3a\u957f\u65b9\u5f62\u65cb\u8f6c\u524d\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684 x\u3001y \u5750\u6807\u3002<\/li>\n<li>w \u548c h \u4e3a\u957f\u65b9\u5f62\u7684\u5bbd\u9ad8\u3002<\/li>\n<li>r \u4e3a\u65cb\u8f6c\u89d2\u5ea6\uff0c\u5355\u4f4d\u4e3a\u5ea6\u6570\u3002<\/li>\n<li>x1 \u548c y1 \u4e3a\u65cb\u8f6c\u540e\u7684\u957f\u65b9\u5f62\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684 x\u3001y \u5750\u6807\u3002<\/li>\n<\/ul>\n<p>\u65cb\u8f6c\u957f\u65b9\u5f62\u540e\uff0c\u8ba1\u7b97\u5176\u8f74\u8ddd\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>const dx = x1 - x;\nconst dy = y1 - y;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u65cb\u8f6c\u957f\u65b9\u5f62\u540e\uff0c\u5982\u4f55\u8ba1\u7b97\u5176\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684\u8f74\u8ddd\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7ed8\u5236\u957f\u65b9\u5f62\u5e76\u65cb\u8f6c\uff0c\u8ba1\u7b97\u65cb\u8f6c\u540e\u8f74\u8ddd \u5728\u62e5\u6709 1920\u00d71080 \u753b\u5e03\u4e2d\uff0c\u653e\u7f6e\u4e00\u4e2a\u5bbd\u9ad8\u4e3a 200\u00d720 \u7684\u957f\u65b9\u5f62\uff0c\u5176\u5750\u6807\u4f4d\u4e8e (100, 100)\u3002\u5f53\u4ee5\u4efb\u610f\u89d2\u5ea6\u65cb\u8f6c\u957f\u65b9\u5f62\u65f6\uff0c\u5982\u4f55\u8ba1\u7b97\u5b83\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684 x\u3001y \u8f74\u8ddd\uff1f \u4ee5\u4e0b\u4ee3\u7801\u63d0\u4f9b\u4e86\u4e00\u4e2a\u8ba1\u7b97\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u8f74\u8ddd\u7684\u89e3\u51b3\u65b9\u6848\uff1a const x = 200; const y = 90; const w = 200; const h = 20; const r = 80; const x1 = x + ((w \/ 2) &#8211; (w \/ 2) * math.cos(r * math.pi \/ 180)); const y1 = (y + (h [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-26838","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/26838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=26838"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/26838\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=26838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=26838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=26838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}