Presets
Playback
Parameters
Camera
Layers
Quality
Model check
The science
What is real. A bat's call is a sound pulse that spreads as a sphere at the speed of sound, c = 331.3 √(1 + T/273.15) m/s (about 343 m/s at 20 °C). In the simulation every call and every echo is a real expanding sphere whose radius is c t; an insect is "hit" in the step when the sphere reaches it, and the echo is a new sphere that starts at the insect's position at that moment. The delay between call and echo is therefore the round-trip time 2R/c (about 5.8 ms per metre of range), which is what the bat uses to measure range.
Sonar equation. The call level is quoted at 0.1 m (SL). It falls by spherical spreading, 20 log10(r/0.1), and by air absorption, α r. The insect re-radiates with a target strength TS (level at 1 m from the insect), and the echo is attenuated again on the way back: EL = SL - 20 log10(r1/0.1) - αr1 + TS - 20 log10(r2) - αr2. The echo is heard when EL reaches the hearing threshold. Because the echo is attenuated twice, range grows only as the fourth root of the source power when absorption is small.
Air absorption. α(f, T, RH) is the ISO 9613-1 pure-tone formula (classical viscous and heat loss plus oxygen and nitrogen vibrational relaxation). At 20 °C and 70 % humidity it gives about 5 dB/km at 1 kHz and about 1.7 dB/m at 50 kHz, which is why high-frequency calls give fine detail but short range. Humid air is not always quieter: absorption has a humidity maximum near the relaxation frequency, so the graph shows several humidities.
Target strength. A small body scatters like a sphere of radius a: for ka >> 1 (wavelength much smaller than the insect) TS = 10 log10(a2/4), and for ka < 1 the echo collapses roughly as (ka)4 (Rayleigh scattering). The factor (ka)4/(1+(ka)4) joins the two regimes smoothly; it is a standard rough interpolation, not a calculation for a real winged body, whose echo also depends on wing position and viewing angle.
Call timing. Bats search at roughly 10 calls per second, then shorten the interval as a target is tracked so that each call is sent after the previous echo returns: PRI = 2R/c + processing time (10 ms; 2 ms in the terminal "buzz", where real bats reach about 150-200 calls per second). The processing times are tuned to give those rates, not measured values.
Honest simplifications. Bats are shown 3.5 times and moths 4 times life size so they can be seen. Time runs in slow motion (default 0.15x) so that sound, which crosses the cave in about 40 ms, is visible; the physics is correct in simulated time. Echoes from cave walls are not computed: bats steer away from walls with a fixed look-ahead, standing in for the strong wall echoes. The bat measures direction exactly and range from the echo delay, ignores Doppler compensation, hears only its own echoes, and has no call-beam pattern, no nose-leaf focusing, and no clutter. The moth ear threshold (default 80 dB at the moth) is an illustrative value, not a species measurement. Sound is not reflected or diffracted by the stalactites. The cave is an ellipsoid with ten rock spikes.
Checks. (1) The simulated round trip of a call to a target and back at three ranges and temperatures against 2R/c; (2) the bisection detection range against the closed-form fourth-root law with no absorption, and against a simulated bat flying at an insect; (3) the Doppler spacing of two echoes from a closing target against T(c - v)/(c + v); (4) the ISO absorption formula against tabulated values, the high-frequency scaling, and the power through spherical shells. Not affiliated with any research group; model for education.