How to plot implicit equations

equation, graph, plot

Solution

One way to do this is to sample the function on a regular, 2D grid. Then you can run an algorithm like marching squares on the resulting 2D grid to draw iso-contours.

In a related question, someone also linked to the gnuplot source code. It's fairly complex, but might be worth going through. You can find it here: http://www.gnuplot.info/

Problem

What is the usual method or algorithm used to plot implicit equations of 2 variables? I am talking about equations such as, sin(x*y)*y = 20 x*x - y*y = 1 Etc. Does anyone know how Maple or Matlab do this? My target language is C#.

Original source