I’ve written a small sketch for Arduino to make a led blink with a function that resembles a human heartbeat.
On [1] Stevens and Lakin describe a detailed mathematical analysis of the signal of the cardiac pulse.
I’ve taken one of their equations that close to the cardiac pulse and generated a lookup table for the luminosity value.
f(x)=(sin(x)^13) * cos(x-PI/10)
check the function graphed on Google
Check the code at Github.
[1] Stevens, Scott; Lakin, William. A Differentiable, Periodic Function for Pulsatile Cardiac
Output Based on Heart Rate and Stroke Volume
http://math.bd.psu.edu/faculty/stevens/Publications/paper3.pdf