{"id":44873,"date":"2026-03-25T10:41:54","date_gmt":"2026-03-25T02:41:54","guid":{"rendered":"https:\/\/www.qiusir.com\/?p=44873"},"modified":"2026-03-25T10:44:00","modified_gmt":"2026-03-25T02:44:00","slug":"qiutopia%e6%a8%aa%e6%b3%a2%e5%92%8c%e7%ba%b5%e6%b3%a2","status":"publish","type":"post","link":"https:\/\/www.qiusir.com\/?p=44873","title":{"rendered":"qiutopIA\u6a2a\u6ce2\u548c\u7eb5\u6ce2"},"content":{"rendered":"\r\n<div id=\"wp_wave_v3_container\" style=\"background: #f8fafc; padding: 15px; border-radius: 12px; border: 1px solid #e2e8f0; font-family: sans-serif;\">\r\n    <canvas id=\"canvas_wp_v3\" style=\"display: block; width: 100%; height: 400px; background: #ffffff; border-radius: 8px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);\"><\/canvas>\r\n    \r\n    <div style=\"display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; background: #f1f5f9; padding: 10px; border-radius: 8px;\">\r\n        <div style=\"text-align: center;\">\r\n            <label style=\"display:block; font-size:11px; font-weight:bold; color:#64748b; margin-bottom:3px;\">\u632f\u5e45<\/label>\r\n            <input type=\"range\" id=\"wa_wp_v3\" min=\"10\" max=\"60\" value=\"35\" style=\"width:90%; cursor:pointer;\">\r\n        <\/div>\r\n        <div style=\"text-align: center;\">\r\n            <label style=\"display:block; font-size:11px; font-weight:bold; color:#64748b; margin-bottom:3px;\">\u9891\u7387<\/label>\r\n            <input type=\"range\" id=\"wf_wp_v3\" min=\"0.01\" max=\"0.1\" step=\"0.01\" value=\"0.04\" style=\"width:100%; cursor:pointer;\">\r\n        <\/div>\r\n        <div style=\"text-align: center;\">\r\n            <label style=\"display:block; font-size:11px; font-weight:bold; color:#64748b; margin-bottom:3px;\">\u901f\u5ea6<\/label>\r\n            <input type=\"range\" id=\"ws_wp_v3\" min=\"1\" max=\"10\" value=\"4\" style=\"width:90%; cursor:pointer;\">\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <script type=\"text\/javascript\">\r\n    (function() {\r\n        var cvs = document.getElementById(\"canvas_wp_v3\");\r\n        var ctx = cvs.getContext(\"2d\");\r\n        var w, h, t = 0;\r\n        \r\n        var ain = document.getElementById(\"wa_wp_v3\");\r\n        var fin = document.getElementById(\"wf_wp_v3\");\r\n        var sin = document.getElementById(\"ws_wp_v3\");\r\n\r\n        function res() {\r\n            w = cvs.parentElement.clientWidth;\r\n            h = 400;\r\n            var dpr = 1;\r\n            if (window.devicePixelRatio) { dpr = window.devicePixelRatio; }\r\n            cvs.width = w * dpr;\r\n            cvs.height = h * dpr;\r\n            ctx.scale(dpr, dpr);\r\n        }\r\n\r\n        function drawArr(x, y, vx, vy, col) {\r\n            var tooSmallX = false;\r\n            var tooSmallY = false;\r\n            if (Math.abs(vx) < 0.1) { tooSmallX = true; }\r\n            if (Math.abs(vy) < 0.1) { tooSmallY = true; }\r\n            if (tooSmallX) {\r\n                if (tooSmallY) { return; }\r\n            }\r\n\r\n            var hl = 7; \r\n            var ex = x + vx;\r\n            var ey = y + vy;\r\n            var ang = Math.atan2(vy, vx);\r\n\r\n            ctx.beginPath();\r\n            ctx.strokeStyle = col;\r\n            ctx.lineWidth = 1.5;\r\n            ctx.moveTo(x, y);\r\n            ctx.lineTo(ex, ey);\r\n            ctx.stroke();\r\n\r\n            ctx.beginPath();\r\n            ctx.fillStyle = col;\r\n            ctx.moveTo(ex, ey);\r\n            ctx.lineTo(ex - hl * Math.cos(ang - 0.5), ey - hl * Math.sin(ang - 0.5));\r\n            ctx.lineTo(ex - hl * Math.cos(ang + 0.5), ey - hl * Math.sin(ang + 0.5));\r\n            ctx.closePath();\r\n            ctx.fill();\r\n        }\r\n\r\n        function run() {\r\n            ctx.clearRect(0, 0, w, h);\r\n            var amp = parseFloat(ain.value);\r\n            var frq = parseFloat(fin.value);\r\n            var spd = parseFloat(sin.value);\r\n            var ty = h * 0.3;\r\n            var ly = h * 0.75;\r\n\r\n            ctx.font = \"bold 12px sans-serif\";\r\n            ctx.fillStyle = \"#475569\";\r\n            ctx.fillText(\"\u6a2a\u6ce2 (Transverse)\", 15, ty - 60);\r\n            ctx.fillText(\"\u7eb5\u6ce2 (Longitudinal)\", 15, ly - 60);\r\n\r\n            var dots = 32;\r\n            var spc = w \/ (dots + 1);\r\n\r\n            for (var i = 0; i <= dots; i++) {\r\n                var xB = (i + 0.5) * spc;\r\n                var ph = i * frq * 10 - t * (spd \/ 10);\r\n                var off = Math.sin(ph) * amp;\r\n                var vM = Math.cos(ph) * amp * 0.7;\r\n                var isM = (i % 8 === 0 ? true : false);\r\n\r\n                \/\/ \u8fde\u7ebf\uff1a\u6a2a\u6ce2\u5e73\u8861\u70b9 -> \u7eb5\u6ce2\u5b9e\u65f6\u70b9\r\n                ctx.beginPath();\r\n                if (isM) { ctx.setLineDash([]); } \r\n                else { ctx.setLineDash([2, 4]); }\r\n                ctx.lineWidth = (isM ? 1.2 : 0.6);\r\n                ctx.strokeStyle = (isM ? \"rgba(239, 68, 68, 0.4)\" : \"rgba(148, 163, 184, 0.15)\");\r\n                ctx.moveTo(xB, ty);\r\n                ctx.lineTo(xB + off, ly);\r\n                ctx.stroke();\r\n\r\n                \/\/ \u7ed8\u5236\u53c2\u8003\u8f74\u70b9\r\n                ctx.beginPath();\r\n                ctx.setLineDash([]);\r\n                ctx.arc(xB, ty, 1.5, 0, 6.28);\r\n                ctx.fillStyle = \"#e2e8f0\";\r\n                ctx.fill();\r\n\r\n                \/\/ \u6a2a\u6ce2\u8d28\u70b9\r\n                if (isM) {\r\n                    drawArr(xB, ty + off, 0, -vM, \"#ef4444\");\r\n                }\r\n                ctx.beginPath();\r\n                ctx.arc(xB, ty + off, (isM ? 4.5 : 3), 0, 6.28);\r\n                ctx.fillStyle = (isM ? \"#ef4444\" : \"#60a5fa\");\r\n                ctx.fill();\r\n\r\n                \/\/ \u7eb5\u6ce2\u8d28\u70b9\r\n                if (isM) {\r\n                    drawArr(xB + off, ly, vM, 0, \"#ef4444\");\r\n                }\r\n                ctx.beginPath();\r\n                ctx.arc(xB + off, ly, (isM ? 4.5 : 3), 0, 6.28);\r\n                ctx.fillStyle = (isM ? \"#ef4444\" : \"#34d399\");\r\n                ctx.fill();\r\n            }\r\n            t += 0.5;\r\n            requestAnimationFrame(run);\r\n        }\r\n\r\n        window.addEventListener(\"resize\", res);\r\n        res();\r\n        run();\r\n    })();\r\n    <\/script>\r\n<\/div>\r\n\r\n\u611f\u8c22\u5f20\u4f2f\u671b\u8001\u5e08\u7684\u6280\u672f\u652f\u6301\u548c\u7aa6\u4e49\u54f2\u8001\u5e08\u7684\u542f\u53d1\u3002","protected":false},"excerpt":{"rendered":"<p>\u632f\u5e45 \u9891\u7387 \u901f\u5ea6 \u611f\u8c22\u5f20\u4f2f\u671b\u8001\u5e08\u7684\u6280\u672f\u652f\u6301\u548c\u7aa6\u4e49\u54f2\u8001\u5e08\u7684\u542f\u53d1\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[5,7],"tags":[443,259,247],"class_list":["post-44873","post","type-post","status-publish","format-image","hentry","category-physics","category-ict","tag-ai","tag-class","tag-physics","post_format-post-format-image"],"_links":{"self":[{"href":"https:\/\/www.qiusir.com\/index.php?rest_route=\/wp\/v2\/posts\/44873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qiusir.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qiusir.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qiusir.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qiusir.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=44873"}],"version-history":[{"count":4,"href":"https:\/\/www.qiusir.com\/index.php?rest_route=\/wp\/v2\/posts\/44873\/revisions"}],"predecessor-version":[{"id":44879,"href":"https:\/\/www.qiusir.com\/index.php?rest_route=\/wp\/v2\/posts\/44873\/revisions\/44879"}],"wp:attachment":[{"href":"https:\/\/www.qiusir.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=44873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qiusir.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=44873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qiusir.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=44873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}