Plot a simple heart-shaped function in C#


// 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);
}


// 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