#include <iostream>
#include <cmath>
#include <thread>
#include <chrono>

using namespace std;

int main() {
    double x, y;

    // Animate the heart filling
    for (double fill = 1.5; fill >= -1.5; fill -= 0.1) {
        cout << "\033[2J\033[H"; // clear screen
        for (y = 1.5; y > -1.5; y -= 0.05) {
            for (x = -1.5; x < 1.5; x += 0.025) {
                double a = x*x + y*y - 1;
                double value = a*a*a - x*x*y*y*y;
                if (value <= 0.0 && y < fill)
                    cout << "\033[1;31m*\033[0m"; // red color
                else
                    cout << " ";
            }
            cout << "\n";
        }
        this_thread::sleep_for(chrono::milliseconds(80)); // speed control
    }

    // Final full heart
    cout << "\033[2J\033[H";
    for (y = 1.5; y > -1.5; y -= 0.05) {
        for (x = -1.5; x < 1.5; x += 0.025) {
            double a = x*x + y*y - 1;
            double value = a*a*a - x*x*y*y*y;
            if (value <= 0.0)
                cout << "\033[1;31m*\033[0m";
            else
                cout << " ";
        }
        cout << "\n";
    }

    cout << "\n\n\033[1;35m     I LOVE YOU ❤️\033[0m\n\n";

    return 0;
}