The Voidspace Techie Blog

sounds like you have a C# graphing pacakge, you just need the contouring algorithm. Just write your own implementation of the "marching squares" contouring algorithm.

See http://www.polytech.unice.fr/~li...Cubes/ algo.html

as an example (this was about the first example I got from googling it). It's not a hard algorithm to understand in 2D.

If your input data is on a coarse grid, you might want to use 2D interpolation to create a finer grid, for a smoother contour line. There are various well tested 2D interpolation routines written as a Fortran library called Dierckx/Fitpack. See www.scipy.org for a CPython interface to these. Then you just need to port the one you want to C#......


Gravatar Cool

Thanks.


Gravatar The easy way to smooth data out, to have color plots, would be to convolve it with a gaussian kernel (if you don't wan't to do it with Fitpack). I think there is an example on the scipy cookbook, but it is currently down.


Name:

Email:

URL:

Comment:  ? 

 

Commenting by HaloScan