Morphing between different virtual microphone patterns.
English: A transition between different horizontal virtual microphones derived from a B-format input. Other information Gnuplot source (created by Jörn Nettingsmeier, CC-BY-SA 3.0 + GFDL) set terminal pngcairo font "/usr/share/fonts/truetype/LiberationMono.ttf,8" size 512,512 set size square set polar set style line 11 lc rgb 'gray80' lt 1 lw 1 set style line 1 lc rgb 'red' lw 3 lt 1 set style line 2 lc rgb 'blue' lw 3 lt 1 set grid polar ls 11 unset border unset raxis unset xtics unset ytics unset key set rrange[0:1.1] set rtics ("" 1, "" 1/sqrt(2), "" .5, "" .5/sqrt(2), "" .25, "" .25/sqrt(2), "" .125) set label 42 '0°' center at first 0, first 1.06 set label 43 '180°' center at first 0, first -1.06 set label 44 '90°' right at first -1.06, 0 set label 45 '270°' left at first 1.06, 0 set for [i=0:6] label (46+i) right at first 0.08, first (1/sqrt(2)**i) sprintf("%2d dB", i*-3.0) W(t)=1/sqrt(2) X(t)=sin(t) # hack to turn 0° axis upwards Y(t)=-cos(t) # dto. #free-field normalised parametric microphone: #gain functions for WXY: GW(p) = p * sqrt(2) GX(T,p) = (1.0-p)*cos(T) GY(T,p) = (1.0-p)*sin(T) card(t,T,p)= GW(p)*W(t) + GX(T,p)*X(t) + GY(T,p)*Y(t) #workaround to map negative r to positive but with blue color: pcard(t,T,p) = card(t,T,p)>0 ? card(t,T,p) : 0 ncard(t,T,p) = card(t,T,p)>0 ? 0 : abs(card(t,T,p)) T=0 # point north! p=1.0 frame=0 do for[a=0.0:47.0] { set output sprintf("polar-%03d.png",frame) frame=frame+1 set label 1 left at first .62, first 1.08 sprintf("Theta: %3.1f°", (T*180.0/pi)) set label 2 right at first 1.05, first 1.01 sprintf("Pattern: %1.6f", p) set label 3 right at first 1.05, first .91 sprintf("W: %1.6f", GW(p)) set label 4 right at first 1.05, first .84 sprintf("X: %1.6f", GX(T,p)) set label 5 right at first 1.05, first .77 sprintf("Y: %1.6f", GY(T,p)) plot pcard(t,T,p) ls 1, ncard(t,T,p) ls 2 p=p-1/72.0 } do for[a=0.0:47.0] { set output sprintf("polar-%03d.png",frame) frame=frame+1 set label 1 left at first .62, first 1.08 sprintf("Theta: %3.1f°", (T*180.0/pi)) set label 2 right at first 1.05, first 1.01 sprintf("Pattern: %1.6f", p) set label 3 right at first 1.05, first .91 sprintf("W: %1.6f", GW(p)) set label 4 right at first 1.05, first .84 sprintf("X: %1.6f", GX(T,p)) set label 5 right at first 1.05, first .77 sprintf("Y: %1.6f", GY(T,p)) plot pcard(t,T,p) ls 1, ncard(t,T,p) ls 2 T=T-(pi/96.0) } do for[a=0.0:47.0] { set output sprintf("polar-%03d.png",frame) frame=frame+1 set label 1 left at first .62, first 1.08 sprintf("Theta: %3.1f°", (T*180.0/pi)) set label 2 right at first 1.05, first 1.01 sprintf("Pattern: %1.6f", p) set label 3 right at first 1.05, first .91 sprintf("W: %1.6f", GW(p)) set label 4 right at first 1.05, first .84 sprintf("X: %1.6f", GX(T,p)) set label 5 right at first 1.05, first .77 sprintf("Y: %1.6f", GY(T,p)) plot pcard(t,T,p) ls 1, ncard(t,T,p) ls 2 p=p-1.0/144.0 } do for[a=0.0:96.0] { set output sprintf("polar-%03d.png",frame) frame=frame+1 set label 1 left at first .62, first 1.08 sprintf("Theta: %3.1f°", (T*180.0/pi)) set label 2 right at first 1.05, first 1.01 sprintf("Pattern: %1.6f", p) set label 3 right at first 1.05, first .91 sprintf("W: %1.6f", GW(p)) set label 4 right at first 1.05, first .84 sprintf("X: %1.6f", GX(T,p)) set label 5 right at first 1.05, first .77 sprintf("Y: %1.6f", GY(T,p)) plot pcard(t,T,p) ls 1, ncard(t,T,p) ls 2 p=p+1.0/96.0 T=T-(1.5*pi/96.0) } set output