0

I have 3 arrays of Rx, Ry, Rz of type float. I'm trying to plot a surface with following code:

        ILArray<float> y = Ry
        ILArray<float> x = Rx
        ILArray<float> z = Rz
        ILArray<float> Z = ILMath.zeros<float>(x.S[0], x.S[1], 3);

        Z[":;:;1"] = x;
        Z[":;:;2"] = y;
        Z[":;:;0"] = z;

        var scene = new ILScene {
            new ILPlotCube(twoDMode: false) {
                new ILSurface(Z) {
                    Wireframe = { Color = Color.FromArgb(50, Color.LightGray) },
                    Colormap = Colormaps.Jet, 
                }
           }
        };
        panel.Scene = scene;

But it draw nothing. Sample points:

z: 1 0,1111111 0,01111111 0,001010101 8,417508E-05 6,475007E-06 0,1111111 0,01388889 0,001984127
x: 3 4 5 6 7 8 2 1 0 
y: 4 4 4 4 4 4 4 4 4

I'm trying to draw a surface like that http://cs618230.vk.me/v618230086/7b18/Q2aQP0uMPUg.jpg

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Max Plakhuta
  • 310
  • 2
  • 14

1 Answers1

0

X, Y and Z must be matrices. Start with some regular grid and change it until you end up where you want to go. Your y looks really suspicious...

See: http://ilnumerics.net/surface-plots.html

Haymo Kutschbach
  • 3,322
  • 1
  • 17
  • 25