{"id":3637,"date":"2024-11-10T17:31:44","date_gmt":"2024-11-10T09:31:44","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3637\/"},"modified":"2024-11-10T17:31:44","modified_gmt":"2024-11-10T09:31:44","slug":"%e5%a6%82%e4%bd%95%e8%ae%a1%e7%ae%97%e6%97%8b%e8%bd%ac%e5%90%8e%e9%95%bf%e6%96%b9%e5%bd%a2%e5%9c%a8%e7%94%bb%e5%b8%83%e4%b8%8a%e7%9a%84%e8%bd%b4%e8%b7%9d%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3637\/","title":{"rendered":"\u5982\u4f55\u8ba1\u7b97\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u5728\u753b\u5e03\u4e0a\u7684\u8f74\u8ddd\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173107640849955.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u8ba1\u7b97\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u5728\u753b\u5e03\u4e0a\u7684\u8f74\u8ddd\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u8ba1\u7b97\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u5728\u753b\u5e03\u4e0a\u7684\u8f74\u8ddd\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u4e0e\u753b\u5e03\u8f74\u8ddd\u8ba1\u7b97<\/strong><\/p>\n<p>\u5728\u7ed9\u5b9a\u7684\u753b\u5e03\u4e2d\uff0c\u6709\u4e00\u4e2a\u957f\u65b9\u5f62\uff0c\u5728\u968f\u673a\u65cb\u8f6c\u4e00\u5b9a\u89d2\u5ea6\u540e\uff0c\u5982\u4f55\u8ba1\u7b97\u5176\u5728\u753b\u5e03\u4e0a\u7684\u8f74\u8ddd\uff0c\u5373\u8ddd\u79bb\u5de6\u4e0a\u89d2\u7684\u8ddd\u79bb\uff1f<\/p>\n<p>\u4ee5\u4e0b\u63d0\u4f9b\u4e00\u79cd\u8ba1\u7b97\u957f\u65b9\u5f62\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684\u65b0\u8f74\u8ddd\u7684\u65b9\u6cd5\uff1a<\/p>\n<pre>const x = 200; \/\/ \u521d\u59cb x \u5750\u6807\nconst y = 90; \/\/ \u521d\u59cb y \u5750\u6807\nconst w = 200; \/\/ \u5bbd\u5ea6\nconst h = 20; \/\/ \u9ad8\u5ea6\nconst r = 80; \/\/ \u65cb\u8f6c\u89d2\u5ea6\uff08\u4ee5\u5ea6\u6570\u4e3a\u5355\u4f4d\uff09\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>\u5728\u8fd9\u4e2a\u8ba1\u7b97\u4e2d\uff1a<\/p>\n<ul>\n<li>x1 \u548c y1 \u5206\u522b\u662f\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u76f8\u5bf9\u4e8e\u5de6\u4e0a\u89d2\u7684 x \u548c y \u8f74\u8ddd\u3002<\/li>\n<li>w \u548c h \u662f\u957f\u65b9\u5f62\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002<\/li>\n<li>r \u662f\u65cb\u8f6c\u89d2\u5ea6\u3002<\/li>\n<li>math.(r * math.pi \/ 180) \u8ba1\u7b97\u65cb\u8f6c\u89d2\u5ea6\u7684\u4f59\u5f26\u503c\u3002<\/li>\n<li>math.sin(r * math.pi \/ 180) \u8ba1\u7b97\u65cb\u8f6c\u89d2\u5ea6\u7684\u6b63\u5f26\u503c\u3002<\/li>\n<\/ul>\n<p>\u4f7f\u7528\u8fd9\u6bb5\u4ee3\u7801\uff0c\u60a8\u53ef\u4ee5\u8ba1\u7b97\u51fa\u4efb\u610f\u65cb\u8f6c\u89d2\u5ea6\u4e0b\u7684\u957f\u65b9\u5f62\u4e0e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684\u8ddd\u79bb\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u8ba1\u7b97\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u5728\u753b\u5e03\u4e0a\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>\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u4e0e\u753b\u5e03\u8f74\u8ddd\u8ba1\u7b97 \u5728\u7ed9\u5b9a\u7684\u753b\u5e03\u4e2d\uff0c\u6709\u4e00\u4e2a\u957f\u65b9\u5f62\uff0c\u5728\u968f\u673a\u65cb\u8f6c\u4e00\u5b9a\u89d2\u5ea6\u540e\uff0c\u5982\u4f55\u8ba1\u7b97\u5176\u5728\u753b\u5e03\u4e0a\u7684\u8f74\u8ddd\uff0c\u5373\u8ddd\u79bb\u5de6\u4e0a\u89d2\u7684\u8ddd\u79bb\uff1f \u4ee5\u4e0b\u63d0\u4f9b\u4e00\u79cd\u8ba1\u7b97\u957f\u65b9\u5f62\u76f8\u5bf9\u4e8e\u753b\u5e03\u5de6\u4e0a\u89d2\u7684\u65b0\u8f74\u8ddd\u7684\u65b9\u6cd5\uff1a const x = 200; \/\/ \u521d\u59cb x \u5750\u6807 const y = 90; \/\/ \u521d\u59cb y \u5750\u6807 const w = 200; \/\/ \u5bbd\u5ea6 const h = 20; \/\/ \u9ad8\u5ea6 const r = 80; \/\/ \u65cb\u8f6c\u89d2\u5ea6\uff08\u4ee5\u5ea6\u6570\u4e3a\u5355\u4f4d\uff09 const x1 = x + ((w \/ 2) &#8211; (w \/ 2) * Math.cos(r * Math.PI \/ 180)) [&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-3637","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3637","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=3637"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3637\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}