如何添加线条,就像我用 ILNumerics 在 Paint 中绘制的那样? 我的场景是使用该代码构建的:
ilPanel1.Scene = new ILScene()
{
new ILPlotCube(twoDMode: false)
{
new ILSurface(func,
xmin: (float)xmin,
xmax: (float)xmax,
ymin: (float)ymin,
ymax: (float)ymax,
xlen: 200,
ylen: 200,
colormap: Colormaps.ILNumerics),
}
};
编辑:
var line = ilPanel1.Scene.Camera.Add(Shapes.Line);
ILArray<float> angles = ILMath.linspace<float>(0, 6, 6);
ILArray<float> pos = ILMath.zeros<float>(1,1,1);
pos["0;:"] = (float)xt; pos["1;:"] = (float)yt;
pos["2;:"] = 0f;
line.Positions = pos;
line.Color = Color.Black;
最佳答案
就这么简单:
ilPanel1.Scene.First<ILPlotCube>().Add(
new ILLines(/* do your line setup here */)
);
关于c# - ILnumerics C# 画线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29751574/