eigendrum

Eigendrum

how it works

A drumhead clamped at its rim can only vibrate in certain shapes, at certain frequencies. Those shapes and frequencies are the solutions of −∇²u = λu inside the shape, u = 0 on the edge. Each solution u is a mode, a standing wave, and each λ gives a frequency proportional to √λ. This is an eigenvalue problem, and for almost every shape it has no formula. So Eigendrum solves it numerically: it covers your shape with a mesh of triangles, builds the finite element stiffness and mass matrices, and finds the smallest eigenvalues of Kφ = λMφ.

工作原理

鼓皮在边缘被固定后,只能以特定的形状和频率振动。这些形状和频率是形状内部方程 −∇²u = λu(边缘处 u = 0)的解。每一个解 u 都是一个模态(驻波),而每一个 λ 对应的频率都与 √λ 成正比。这是一个特征值问题,对于几乎所有形状,它都没有解析公式。因此,Eigendrum 通过数值方法求解:它用三角形网格覆盖你的形状,构建有限元刚度矩阵和质量矩阵,并求出 Kφ = λMφ 的最小特征值。

why you can trust the numbers

A few shapes have spectra that can be written down exactly, and the solver is tested against them on every change. A circle’s frequencies are the zeros of Bessel functions; a rectangle’s are π²(m²/a² + n²/b²). The solver reproduces both to better than a tenth of a percent, and because a conforming finite element method minimises energy over a restricted space, its answers are guaranteed slight overestimates, never under. The measured error is in “the numbers”.

为什么你可以信任这些数据

少数形状的频谱可以精确写出,求解器在每次更新时都会针对这些形状进行测试。圆形的频率是贝塞尔函数的零点;矩形的频率则是 π²(m²/a² + n²/b²)。求解器对两者的还原精度均优于 0.1%。由于协调有限元法(conforming finite element method)在受限空间内最小化能量,其结果保证是略微偏高的估计值,绝不会偏低。测量出的误差即为“数据”本身的误差。

where you strike it matters

Striking a spot drives each mode in proportion to how much that mode moves there. Hit a line where a mode stands still and you cannot excite it at all. That was not programmed in; it falls out of projecting the mallet onto the modes. So a strike is never one mode: it is every mode at once, in a mixture set by where your mallet landed. The rules along the mode list are that mixture, and the modes marked with a square were the ones your mallet could not reach. Pressing a row instead plays that single mode alone - something no mallet can do, and the only way to hear what one frequency of a shape actually sounds like.

敲击位置至关重要

敲击某一点会激发各个模态,激发程度与该模态在该点的位移量成正比。如果你敲击模态的静止线(节点),该模态将完全无法被激发。这不是预先编程的结果,而是通过将槌击投影到模态上自然产生的。因此,一次敲击绝非单一模态,而是所有模态的集合,其混合比例取决于槌落下的位置。模态列表中的规则反映了这种混合,被标记为方块的模态即是你的槌无法触及的。相反,点击某一行则会单独播放该模态——这是任何槌都无法做到的,也是聆听某种形状单一频率真实音色的唯一方法。

drums from equations

Besides tracing an outline you can write one. r(t) gives the radius as t sweeps one full turn, so 1 + 0.3cos(5t) is a five-lobed flower; a parametric x(t), y(t) pair reaches the closed curves polar cannot, like a nephroid or an egg. This is not a shortcut for drawing. It reaches shapes no hand traces accurately - eleven even lobes, a superellipse partway between a circle and a square - and it makes a shape something you vary: change one number and hear what moved. A written shape travels as its own text. The link for a formula holds the formula, so it is something you can read and retype rather than a few hundred characters of encoded outline, and editing it in the address bar works. Anything too thin to mesh honestly is refused rather than answered, because a sliver would still return numbers and they would be wrong.

方程式生成的鼓

除了描绘轮廓,你还可以通过公式编写形状。r(t) 给出了 t 旋转一周时的半径,例如 1 + 0.3cos(5t) 是一个五瓣花;参数方程 x(t), y(t) 可以实现极坐标无法达到的闭合曲线,如肾形线或卵形。这不是绘图的捷径,它能实现人手无法精确描绘的形状——比如十一个均匀花瓣,或介于圆与方之间的超椭圆。它让形状变得可变:改变一个数字,就能听到变化。编写的形状以文本形式存在。公式链接中包含了公式本身,因此你可以阅读并重新输入,而不是面对几百个字符的编码轮廓,直接在地址栏编辑即可生效。任何太薄而无法进行有效网格划分的形状都会被拒绝,因为即便强行计算出数据,结果也是错误的。

can one hear the shape of a drum?

Mark Kac asked exactly that in 1966. In 1992 Carolyn Gordon, David Webb and Scott Wolpert answered no, by building two different shapes with identical spectra. Both are in the form list as Kac drum I and II. Each is made from the same seven triangles, rearranged. They enclose the same area and the same perimeter, and every frequency matches. Switch between them and listen: the outlines are plainly different and the sound is not.

人能听出鼓的形状吗?

Mark Kac 在 1966 年提出了这个问题。1992 年,Carolyn Gordon、David Webb 和 Scott Wolpert 给出了否定的答案,他们构建了两个具有相同频谱的不同形状。两者都在形状列表中,即 Kac drum I 和 II。它们由相同的七个三角形重新排列而成,面积和周长相同,且每一个频率都完全匹配。在两者之间切换并聆听:轮廓明显不同,但声音却是一样的。

what is a modelling choice

The frequency ratios, the mode shapes and the pitch of the fundamental are physics, fixed entirely by the outline. What is not in the outline is the wave speed, which is tension and density: the pitch slider sets that by naming the note a circle of this area would sound, and each shape then lands above the reference by its own amount. Every shape is scaled to the same area before solving, so that offset is shape and not size - about six semitones across the built-in shapes, with the circle lowest, which is Faber-Krahn rather than a choice. How fast each overtone fades is material and air, so that stays a slider rather than a silent assumption. The mallet is modelled too. Its width is a slider; its contact time is fixed at a few milliseconds, because no real beater is instantaneous and one that was would drive every mode equally hard. Both decide how much of a mode a strike can reach, and neither can move a mode’s frequency. Damping is Rayleigh damping, so loss rises with the square of frequency: the high overtones die away first, which is why a drum darkens as it rings.

什么是建模选择

频率比、模态形状和基音音高属于物理范畴,完全由轮廓决定。轮廓中未包含的是波速,它取决于张力和密度:音高滑块通过设定该面积的圆所发出的音符来确定波速,每个形状随后会根据自身特性高于该参考音高。每个形状在求解前都会缩放到相同面积,因此这种偏移是由形状而非大小决定的——内置形状之间大约有六个半音的差异,其中圆形的音高最低,这是 Faber-Krahn 定理的结果,而非人为选择。每个泛音的衰减速度取决于材料和空气,因此这保留为一个滑块,而不是默认假设。槌也被建模了:其宽度是一个滑块;接触时间固定为几毫秒,因为现实中没有瞬时的敲击,如果是瞬时的,它会同等程度地激发所有模态。两者都决定了敲击对模态的激发程度,但都不会改变模态的频率。阻尼采用瑞利阻尼(Rayleigh damping),因此损耗随频率的平方增加:高频泛音先消失,这就是为什么鼓声在余韵中会变得低沉。

where it lives, and how to reach me

Eigendrum is hosted at eigendrum.com. That is the address to link to and to cite; the older baselashraf81.github.io/eigendrum is a mirror that now redirects there. For advertising or partnership enquiries, write to u2679054@uel.ac.uk. For anything wrong with the maths or the interface, an issue on the repository is better, because then the fix is public.

网站地址与联系方式

Eigendrum 托管在 eigendrum.com。这是链接和引用的地址;旧地址 baselashraf81.github.io/eigendrum 是一个现已重定向到此的镜像。如有广告或合作咨询,请发送邮件至 u2679054@uel.ac.uk。如果数学计算或界面有任何问题,在代码仓库提交 issue 是更好的选择,因为这样修复过程是公开的。

colophon

No build step and no application backend: the mesh, the solve and the audio all run on your own machine. The deployed site uses Vercel Analytics and Google Analytics; it carries no advertising network and no consent banner. Support toward the domain and hosting is voluntary, via the link above. The shape you draw lives in the address bar after the #, which browsers never send to a server, and analytics is configured not to record it. Details in the privacy notice. Set in Jost* by indestructible type*. After Kac, Can One Hear the Shape of a Drum? (1966); Gordon, Webb and Wolpert (1992); and Driscoll, Eigenmodes of Isospectral Drums (1997), whose coordinates the two Kac drums use. Source, including the solver and the tests that check it against the closed-form spectra: github.com/BaselAshraf81/eigendrum. Free to use, with no account and nothing to install. If you would like to put something towards it, or would rather it were not ad-supported: ko-fi.com/baselashraf

后记

无构建步骤,无应用后端:网格划分、求解和音频处理均在你的本地机器上运行。部署的网站使用 Vercel Analytics 和 Google Analytics;不含广告网络,无弹窗同意横幅。对域名和托管的支持是自愿的,可通过上述链接进行。你绘制的形状存在于地址栏 # 之后,浏览器从不将其发送到服务器,分析工具也已配置为不记录该信息。详情见隐私声明。字体采用 indestructible type* 的 Jost*。参考资料:Kac, Can One Hear the Shape of a Drum? (1966); Gordon, Webb and Wolpert (1992); 以及 Driscoll, Eigenmodes of Isospectral Drums (1997)(两个 Kac 鼓的坐标即源于此)。源代码(包括求解器及针对闭式频谱的测试):github.com/BaselAshraf81/eigendrum。免费使用,无需账户,无需安装。如果你想提供支持,或希望它保持无广告状态,请访问:ko-fi.com/baselashraf