Plot a simple heart-shaped function in C#
The example Plot a heart-shaped function in C# shows how to draw a relatively complex heart-shaped function. Recently I saw a much simpler function on a t-shirt at ThinkGeek.com on this page. The function is:
// The function.
private float HeartFunc(float x, float y)
{
double a = x * x;
double b = y - Math.Pow(x * x, (double)1 / 3);
return (float)(a + b * b - 1);
}



Comments