_TITLE "Beating heart w sound #2" '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
'2020-11-23 Inspired by heart animation from TempodiBasic link to Culture Club: Love is Love
' [youtube]https://www.youtube.com/watch?v=_ut11U4JupI[/youtube] maybe play this while watching heartbeat?
CONST xmax
= 800, ymax
= 600, CX
= xmax
/ 2, CY
= ymax
/ 2 - 50 'screen stuff
prepPalette
hb&
= _SNDOPEN("heartbeat.wav") 'get the beat goingri = 1 ' reds index
loopCount = loopCount + 1
ri = ri - 1
ri = ri - 1
x = CX + m * magnify * xCard(a)
y = CY - m * magnify * yCard(a)
LINE (x
, y
)-(lastx
, lasty
), border
lastx = x: lasty = y
PAINT (CX
+ (m
- .5) * magnify
* xCard
(_PI(.7)), CY
- (m
- .5) * magnify
* yCard
(_PI(.7))), reds
(ri
+ (17 - m
)), border
ri = ri + 1
'Reference and thanks to:
' http://mathworld.wolfram.com/HeartCurve.html
' find the 6th heart curve equations #7, 8
yCard
= 13 * COS(t
) - 5 * COS(2 * t
) - 2 * COS(3 * t
) - COS(4 * t
)