{"id":3513,"date":"2024-11-10T14:21:59","date_gmt":"2024-11-10T06:21:59","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3513\/"},"modified":"2024-11-10T14:21:59","modified_gmt":"2024-11-10T06:21:59","slug":"%e5%a6%82%e4%bd%95%e8%ae%a1%e7%ae%97%e6%97%8b%e8%bd%ac%e5%90%8e%e7%9a%84%e9%95%bf%e6%96%b9%e5%bd%a2%e5%9c%a8%e7%94%bb%e5%b8%83%e4%b8%8a%e7%9a%84-xy-%e8%bd%b4%e8%b7%9d%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3513\/","title":{"rendered":"\u5982\u4f55\u8ba1\u7b97\u65cb\u8f6c\u540e\u7684\u957f\u65b9\u5f62\u5728\u753b\u5e03\u4e0a\u7684 XY \u8f74\u8ddd\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173104884355886.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u8ba1\u7b97\u65cb\u8f6c\u540e\u7684\u957f\u65b9\u5f62\u5728\u753b\u5e03\u4e0a\u7684 XY \u8f74\u8ddd\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u8ba1\u7b97\u65cb\u8f6c\u540e\u7684\u957f\u65b9\u5f62\u5728\u753b\u5e03\u4e0a\u7684 XY \u8f74\u8ddd\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u65cb\u8f6c\u957f\u65b9\u5f62\u540e\u8ba1\u7b97\u5176\u753b\u5e03xy\u8f74\u8ddd<\/strong><\/p>\n<p>\u5728\u521b\u5efa\u7684\u753b\u5e03\u4e0a\u6dfb\u52a0\u4e86\u4e00\u4e2a\u957f\u65b9\u5f62\uff0c\u5e76\u63d0\u4f9b\u5176\u5bbd\u3001\u9ad8\u548c\u521d\u59cb\u5750\u6807\u3002\u4e3a\u4e86\u89c6\u89c9\u5316\u65cb\u8f6c\u6548\u679c\uff0c\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u65cb\u8f6c\u7279\u5b9a\u89d2\u5ea6\u540e\u7684\u56fe\u7247\u3002<\/p>\n<p>\u95ee\u9898\u662f\u5982\u4f55\u8ba1\u7b97\u4efb\u610f\u89d2\u5ea6\u65cb\u8f6c\u540e\uff0c\u8fd9\u4e2a\u957f\u65b9\u5f62\u7684xy\u8f74\u8ddd\u3002\u8fd9\u6d89\u53ca\u5230\u4f7f\u7528\u4e09\u89d2\u5b66\u6765\u8ba1\u7b97\u65cb\u8f6c\u540e\u7684\u5750\u6807\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a javascript \u4ee3\u7801\u793a\u4f8b\uff0c\u7528\u4e8e\u8ba1\u7b97\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u7684 xy \u8f74\u8ddd\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>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff1a<\/p>\n<ul>\n<li>x \u548c y \u662f\u957f\u65b9\u5f62\u539f\u59cb\u5750\u6807\u7684 x \u548c y \u5206\u91cf\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\uff08\u4ee5\u5ea6\u4e3a\u5355\u4f4d\uff09\u3002<\/li>\n<li>x1 \u548c y1 \u662f\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u7684 x \u548c y \u8f74\u8ddd\u3002<\/li>\n<\/ul>\n<p>\u6b64\u516c\u5f0f\u4f7f\u7528\u4e09\u89d2\u5b66\u6765\u8ba1\u7b97\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u7684\u5750\u6807\u3002\u5b83\u5229\u7528\u4ee5\u4e0b\u4e8b\u5b9e\uff1a<\/p>\n<ul>\n<li>\u65cb\u8f6c\u540e\u7684\u957f\u65b9\u5f62\u4e0e\u539f\u59cb\u957f\u65b9\u5f62\u7684\u4e2d\u5fc3\u4e4b\u95f4\u7684\u8ddd\u79bb\u4e3a (w \/ 2)\u3002<\/li>\n<li>\u65cb\u8f6c\u540e\u7684\u957f\u65b9\u5f62\u4e0e\u6c34\u5e73\u8f74\u4e4b\u95f4\u7684\u89d2\u5ea6\u4e3a r\u3002<\/li>\n<li>\u65cb\u8f6c\u540e\u7684\u957f\u65b9\u5f62\u4e0e\u6c34\u5e73\u8f74\u4e4b\u95f4\u7684\u8ddd\u79bb\u4e3a (w \/ 2) * math.(r * math.pi \/ 180)\u3002<\/li>\n<li>\u65cb\u8f6c\u540e\u7684\u957f\u65b9\u5f62\u4e0e\u5782\u76f4\u8f74\u4e4b\u95f4\u7684\u8ddd\u79bb\u4e3a (w \/ 2) * math.sin(r * math.pi \/ 180)\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u5c06\u8fd9\u4e9b\u503c\u76f8\u52a0\uff0c\u53ef\u4ee5\u5f97\u5230\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u7684 xy \u8f74\u8ddd\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u8ba1\u7b97\u65cb\u8f6c\u540e\u7684\u957f\u65b9\u5f62\u5728\u753b\u5e03\u4e0a\u7684 XY \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\u957f\u65b9\u5f62\u540e\u8ba1\u7b97\u5176\u753b\u5e03xy\u8f74\u8ddd \u5728\u521b\u5efa\u7684\u753b\u5e03\u4e0a\u6dfb\u52a0\u4e86\u4e00\u4e2a\u957f\u65b9\u5f62\uff0c\u5e76\u63d0\u4f9b\u5176\u5bbd\u3001\u9ad8\u548c\u521d\u59cb\u5750\u6807\u3002\u4e3a\u4e86\u89c6\u89c9\u5316\u65cb\u8f6c\u6548\u679c\uff0c\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u65cb\u8f6c\u7279\u5b9a\u89d2\u5ea6\u540e\u7684\u56fe\u7247\u3002 \u95ee\u9898\u662f\u5982\u4f55\u8ba1\u7b97\u4efb\u610f\u89d2\u5ea6\u65cb\u8f6c\u540e\uff0c\u8fd9\u4e2a\u957f\u65b9\u5f62\u7684xy\u8f74\u8ddd\u3002\u8fd9\u6d89\u53ca\u5230\u4f7f\u7528\u4e09\u89d2\u5b66\u6765\u8ba1\u7b97\u65cb\u8f6c\u540e\u7684\u5750\u6807\u3002 \u4ee5\u4e0b\u662f\u4e00\u4e2a javascript \u4ee3\u7801\u793a\u4f8b\uff0c\u7528\u4e8e\u8ba1\u7b97\u65cb\u8f6c\u540e\u957f\u65b9\u5f62\u7684 xy \u8f74\u8ddd\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 \/ 2)) &#8211; [&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-3513","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3513","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=3513"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3513\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}