ILnumerics c#画线
ILnumerics c# draw line
如何添加线条,就像我在 Paint 中使用 ILNumerics 绘制一样?
我的场景正在使用该代码构建:
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 */)
);
如何添加线条,就像我在 Paint 中使用 ILNumerics 绘制一样? 我的场景正在使用该代码构建:
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 */)
);