问题
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