public static List<PointF> ECG_Complex__QRST_VF (Patient _P, Lead _L, float _Amp) { float _Length = _P.GetHR_Seconds, _Wave = _P.GetHR_Seconds / 2f, _Amplitude = (float)(Math.RandomDouble (0.3f, 0.6f) * _Amp); List<PointF> thisBeat = new List<PointF> (); while (_Length > 0f) { thisBeat = Plotting.Concatenate (thisBeat, Plotting.Curve (ResolutionTime, _Wave, _Amplitude, 0f, Plotting.Last (thisBeat))); // Flip the sign of amplitude and randomly crawl larger/smaller, models the // flippant waves in v-fib. _Amplitude = 0 - (float)Math.Clamp (Math.RandomDouble (_Amplitude - 0.1f, _Amplitude + 0.1f), -1f, 1f); _Length -= _Wave; } return thisBeat; }