This is the third example that shows how to plot functions that draw hearts. This time the function is:

The following examples also draw heart-shaped functions. See the first for an explanation of how the programs work.
The difference is that this example uses the function shown above. The following code shows how it implements the function in code.
// The function. private float HeartFunc(float x, float y) { double a = x * x; double b = 5.0 * y / 4.0 - Math.Sqrt(Math.Abs(x)); return (float)(a * a + b * b - 1); }
See the earlier example for more details.



