Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Valentine's Beating Heart
#4
I don't know if Steve knows this but I did beating heart years ago:
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 Function

Lost 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
Reply


Messages In This Thread
Valentine's Beating Heart - by SMcNeill - 02-15-2026, 05:51 PM
RE: Valentine's Beating Heart - by bplus - 02-15-2026, 06:04 PM
RE: Valentine's Beating Heart - by bplus - 02-15-2026, 06:26 PM
RE: Valentine's Beating Heart - by bplus - 02-15-2026, 06:38 PM
RE: Valentine's Beating Heart - by ahenry3068 - 02-15-2026, 08:55 PM
RE: Valentine's Beating Heart - by bplus - 02-15-2026, 09:02 PM
RE: Valentine's Beating Heart - by SMcNeill - 02-15-2026, 10:12 PM
RE: Valentine's Beating Heart - by SMcNeill - 02-15-2026, 10:25 PM
RE: Valentine's Beating Heart - by PhilOfPerth - 02-15-2026, 10:56 PM
RE: Valentine's Beating Heart - by SMcNeill - 02-15-2026, 11:10 PM
RE: Valentine's Beating Heart - by SMcNeill - 02-15-2026, 11:13 PM
RE: Valentine's Beating Heart - by bplus - 02-15-2026, 11:54 PM
RE: Valentine's Beating Heart - by ahenry3068 - 02-16-2026, 12:09 AM
RE: Valentine's Beating Heart - by Petr - 02-16-2026, 06:40 PM
RE: Valentine's Beating Heart - by bplus - 02-15-2026, 11:49 PM
RE: Valentine's Beating Heart - by TempodiBasic - 02-16-2026, 12:57 AM
RE: Valentine's Beating Heart - by ahenry3068 - 02-16-2026, 01:18 AM
RE: Valentine's Beating Heart - by bplus - 02-16-2026, 10:04 AM
RE: Valentine's Beating Heart - by Magdha - 02-16-2026, 10:31 AM
RE: Valentine's Beating Heart - by TempodiBasic - 02-16-2026, 04:26 PM
RE: Valentine's Beating Heart - by bplus - 02-16-2026, 08:39 PM
RE: Valentine's Beating Heart - by Unseen Machine - 02-17-2026, 02:18 AM
RE: Valentine's Beating Heart - by bplus - 02-17-2026, 02:53 AM
RE: Valentine's Beating Heart - by Unseen Machine - 02-17-2026, 03:00 AM
RE: Valentine's Beating Heart - by bplus - 02-17-2026, 03:02 AM
RE: Valentine's Beating Heart - by Unseen Machine - 02-17-2026, 03:24 AM
RE: Valentine's Beating Heart - by bplus - 02-17-2026, 03:39 AM
RE: Valentine's Beating Heart - by SMcNeill - 02-17-2026, 03:51 AM
RE: Valentine's Beating Heart - by Unseen Machine - 02-17-2026, 04:13 AM
RE: Valentine's Beating Heart - by bplus - 02-17-2026, 03:16 PM
RE: Valentine's Beating Heart - by PhilOfPerth - 02-17-2026, 10:17 PM
RE: Valentine's Beating Heart - by bplus - 02-18-2026, 12:13 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)