Код выглядит так:
//we need to render locations.
ILArray<float> ourPositions = ourSimulator.getStars();
var scene = new ILScene();
var plotCube = scene.Add(new ILPlotCube(twoDMode: false));
var ourPosBuffer = new ILPoints();
ourPosBuffer.Positions = ourPositions;
plotCube.Add(ourPosBuffer);
plotCube.FieldOfView = 120;
plotCube.LookAt = new Vector3(0, 0, 0);
iLStarChart.Scene.Configure();
Теперь более ранняя версия этого кода (в другом решении) по-прежнему использует 3.3.2, и
var plotCube = scene.Add(new ILPlotCube(null, false) )
Я пробовал оба в версии 3.3.3, и не отображает трехмерный график. Вместо этого это 2d сетка. Что я здесь делаю неправильно?
(пункты:
<Single> [3,4]
-32.00000 37.00000 36.00000 38.00000
54.00000 107.00000 106.00000 130.00000
-81.00000 -16.00000 -124.00000 -226.00000
)
EDITED: Отсутствует) в примере 3.3.2
EDITED: уменьшено часть некритического кода из примера.
Ожидаемый результат заключается в том, что у меня есть 3D-график с осью x, y и z. Я получаю 2-й сюжет. Нет оси z. Я проверил точки (это ToString)
Образец прогона обеспечивает это: https://www.dropbox.com/s/imiw8tbe0lh8q9x/2DPlot.png
Это пример того, что я использовал, вам нужно добавить "ILSurface" в plotcube
//Replace and make sure they are all added in order
Single[] zs = [All Zs]
Single[] xs = [All Xs]
Single[] ys = [All Ys]
//create array of points //something like below
ILArray<float> points = ILMath.zeros<float>(xs.Length/s, s, 3);
points[":;:;0"] = zs;
points[":;:;1"] = xs;
points[":;:;2"] = ys;
// construct a new plotcube and plot the points
scene = new ILScene();
cube = new ILPlotCube(twoDMode: false);
surface = new ILSurface(points, colormap: Colormaps.Jet);
//set scene properties
scene.Add(cube);
//display cube in scene
ilPanel1.Scene = scene;