02-15-2026, 06:38 PM
I don't know if Steve knows this but I did beating heart years ago:
Lost the sound to it but it had a lub-dub beat to it.
Code: (Select All)
_Title "Beating heart w sound" 'B+ 2019-02-16
'2019-02-16 Beating Cardiod
'2019-02-28 random magnify and beat, redder heart
'2020-11-21 Beating heart w sound
' Thanks to SoundBible for .wav file
' http://soundbible.com/2162-Human-Heartbeat.html
' About: Human heart beating loud and strong. could also be used to show someone is worried, afraid, or injured.
' Title: Human Heartbeat
' Uploaded: 4.24.17
' License: Attribution 3.0
' Recorded by Daniel Simion
' File Size: 2.52 MB
' Downloads: 174359
Const xmax = 800, ymax = 600
Screen _NewImage(xmax, ymax, 32)
_Delay .25
_ScreenMove _Middle
hb& = _SndOpen("heartbeat.wav") ' doesn't want to work ????
_SndLoop hb&
'center of screen
CX = xmax / 2
CY = ymax / 2 - 50
While _KeyDown(27) = 0
Cls
loopCount = loopCount + 1
Select Case loopCount Mod 8
Case 0: magnify = 10
Case 1: magnify = 12
Case 2: magnify = 10
Case 3: magnify = 14
Case 4: magnify = 10
Case 5: magnify = 10
Case 6: magnify = 10
Case 7: magnify = 10
End Select
For a = -_Pi To _Pi Step _Pi(1 / 360)
x = CX + magnify * xCard(a)
y = CY - magnify * yCard(a)
If a <> -_Pi Then
Line (x, y)-(lastx, lasty), _RGB(140, 0, 0)
End If
lastx = x: lasty = y
Next
Paint (CX, CY), _RGB(180, 0, 0), _RGB(140, 0, 0)
_Display
_Limit 11.1
Wend
'Reference and thanks to:
' http://mathworld.wolfram.com/HeartCurve.html
' find the 6th heart curve equations #7, 8
Function xCard (t)
xCard = 16 * Sin(t) ^ 3
End Function
Function yCard (t)
yCard = 13 * Cos(t) - 5 * Cos(2 * t) - 2 * Cos(3 * t) - Cos(4 * t)
End FunctionLost the sound to it but it had a lub-dub beat to it.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever

