SkillAgentSearch skills...

Heart

Hearts drawn with Python Matplotlib and C

Install / Use

/learn @susam/Heart
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Heart

This project contains a few programs written in Python and C that plot my heart for my Cutie Pai.

Contents

Python (2014)

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.

Setup and Run

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.

Output

heart-2014-02-14.png

Quadratic and Quartic Curves

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.

C (2019)

The source code in heart.c may be compiled with any standard C compiler that supports C89 (ANSI C).

Compile and Run

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.

Output

...............................................................
...............................................................
.................. @@@@@@@ ......... @@@@@@@ ..................
............... @@@@     @@@@ ... @@@@     @@@@ ...............
............. @@@           @@@ @@@           @@@ .............
............ @@@               @               @@@ ............
............ @@@    Cutie Pai,                 @@@ ............
............ @@@                               @@@ ............
............. @@@         I love you!         @@@ .............
............... @@@@                       @@@@ ...............
.................. @@@@     -- Susam    @@@@ ..................
..................... @@@@           @@@@ .....................
........................ @@@@     @@@@ ........................
........................... @@@ @@@ ...........................
.............................. @ ..............................
...............................................................
...............................................................

License

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.

Related Skills

View on GitHub
GitHub Stars42
CategoryDevelopment
Updated8mo ago
Forks6

Languages

Python

Security Score

87/100

Audited on Jul 19, 2025

No findings