View all expressions
Motion

Heartbeat Pulse Animation

Simulates a biologically accurate human cardiac rhythm (systole and diastole) on the Scale property. Unlike a simple sine wave, this expression creates the distinct "lub-dub" double-pulse motion found in medical EKG animations.

Contributed by:


bpm = 72; // Beats Per Minute
intensity = 15; // How much to scale up (in %)
period = 60 / bpm;
t = time % period;
// Simulation constants
decay = 20; // How snappy the beat is
gap = 0.35; // Time delay between lub and dub in seconds
pulse1 = Math.sin(t * 20) * Math.exp(-decay * t);
if (pulse1 < 0) pulse1 = 0;
t2 = t - gap;
pulse2 = 0;
if (t2 > 0) {
pulse2 = Math.sin(t2 * 20) * Math.exp(-decay * t2);
if (pulse2 < 0) pulse2 = 0;
}
totalPulse = pulse1 + (pulse2 * 0.8);
s = value[0] + (totalPulse * intensity);
[s, s];

Heartbeat Pulse Animation

Practical use case

Great for medical visualizations, health-related UI dashboards, intense thriller titles, or adding a "living" breathing effect to character icons.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image