How to plot 3d function using IlPanel c#

1.7k views Asked by At

I'm using Ilnumerics and now I would like know if it's possible plot in IlPanel function with two variables like f(x,y).

I have searched around internet but I have found nothing. Someone can help me?

1

There are 1 answers

1
Haymo Kutschbach On BEST ANSWER

Up from version 3.3.2. 'ILSurface' allows the definition of a function of two arguments to be plotted as a surface:

private void ilPanel1_Load(object sender, EventArgs e) {
    ilPanel1.Scene.Add(
        new ILPlotCube(twoDMode: false) {
            new ILSurface((x,y) => {
                return (float)Math.Sin(0.1f * x * x + 0.2f * y * y);
            })
        }); 
}

Result: ILNumerics Surface based on a function of two variables