How to plot 3d function using IlPanel c#

只谈情不闲聊 提交于 2019-12-24 07:45:18

问题


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:


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:



来源:https://stackoverflow.com/questions/20412951/how-to-plot-3d-function-using-ilpanel-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!