Arthur Alunts Asked:2020-03-17 17:08:42 +0000 UTC2020-03-17 17:08:42 +0000 UTC 2020-03-17 17:08:42 +0000 UTC 求克拉尼图的公式 772 有克拉尼数字。根据声音的频率,从沙子、盐等中获得数字。A. Chladni pt.1 的人物 B. Chladni pt.2 的人物 如何获得根据声音找到盐(沙)图形形状的通用公式? 你能帮我吗? javascript 1 个回答 Voted Best Answer Stranger in the Q 2020-03-18T03:11:04Z2020-03-18T03:11:04Z 在这里,拜托,我借了 shader c ( shadertoy ),我有我自己的迷你库: let rgba = new RGBA(` const float PI = 3.14159265; vec2 p = (2.0 * gl_FragCoord.xy - resolution.xy) / resolution.y; vec4 s1 = vec4(1.0, 1.0, 1.0, 1.0); vec4 s2 = vec4(-4.0, 4.0, 1.0, 4.6); float a = mix(s1.x, s2.x, xy.x); float b = mix(s1.y, s2.y, xy.x); float n = mix(s1.z, s2.z, xy.y); float m = mix(s1.w, s2.w, xy.y); float amp = a * sin(PI*n*p.x) * sin(PI*m*p.y) + b * sin(PI*m*p.x) * sin(PI*n*p.y); float col = 1.0 - smoothstep(abs(amp), 0.0, 0.1); gl_FragColor = vec4(vec3(col), 1.0); `, {uniforms: {xy: '2f'}}); addEventListener('mousemove', e => rgba.xy([e.x/innerWidth,e.y/innerHeight])) <script src="https://raw.githack.com/strangerintheq/rgba/0.0.1/src/rgba.js"></script> http://paulbourke.net/geometry/chladni/ https://thelig.ht/chladni/
在这里,拜托,我借了 shader c ( shadertoy ),我有我自己的迷你库:
http://paulbourke.net/geometry/chladni/
https://thelig.ht/chladni/