NB. Vibrating drum

drum=: 3 : 0
R=. steps 0 1 21
T=. steps 0 36r16p1 21
X=. R */ cos T
Y=. R */ sin T
Z=. 0.1+0.4 * (BesselJ2 R*11.6) */ cos +:T
1.8 * makexyz X;Y;Z
)

BesselJ2=: 3 : 0
t=. 1r128p1 * i.129
r=. (cos +:t) * cos (sin t) */ y.
(+/ r * 1,(127$4 2),1) % 384
)

ROTXYZ=: 310 0 340
COLOR=: PALEGREEN
CLEARCOLOR=: SKYBLUE

demo=: 3 : 0
stdknotv=: defknots
stdlistlight''
gluNurbsCallback GL_ERROR
2 drawsurface makenewlist drum''
)
