This project contains a few programs written in Python and C that plot my heart for my Cutie Pai.
The source code in heart.py may be executed with Python 3.4 or any later version of Python interpreter. It depends on the the Matplotlib package.
Enter these commands to set up a virtual Python environment with this package and run the Python program.
make py-venv
make py-heart
The output is written to a PNG file named heart-2014-02-14.png.
To read about the two mathematical functions used in the source code, see this thread on Reddit where I have explained how these functions plot the curves that form the heart.
The source code in heart.c may be compiled with any standard C compiler that supports C89 (ANSI C).
Enter these commands to compile and run the C program.
make c-heart
The output is written to a text file named heart-2019-02-14.txt.
...............................................................
...............................................................
.................. @@@@@@@ ......... @@@@@@@ ..................
............... @@@@ @@@@ ... @@@@ @@@@ ...............
............. @@@ @@@ @@@ @@@ .............
............ @@@ @ @@@ ............
............ @@@ Cutie Pai, @@@ ............
............ @@@ @@@ ............
............. @@@ I love you! @@@ .............
............... @@@@ @@@@ ...............
.................. @@@@ -- Susam @@@@ ..................
..................... @@@@ @@@@ .....................
........................ @@@@ @@@@ ........................
........................... @@@ @@@ ...........................
.............................. @ ..............................
...............................................................
...............................................................
This is free and open source software. You can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of it, under the terms of the MIT License. See LICENSE.md for details.
This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, express or implied. See LICENSE.md for details.