我想使用 jMathPlot 绘制一个立方体。立方体的点是:
(0,0,1),(1,0,1),(1,1,1),(0,1,1),(0,0,2),(1,0,2),(1 ,1,2),(0,1,2)
我有这些变量:
double[] x = {0,1,0,1};
double[] y = {0,1,0,1};
double[][] z1 = {{1,1,2,2},
{2,2,1,1},
{1,1,2,2},
{1,1,2,2}};
Plot3DPanel plot = new Plot3DPanel("SOUTH");
plot.addGridPlot("cube", Color.red ,x, y, z1);
它不起作用,老实说,我仍然不明白为什么z
必须是二维数组?
任何帮助,将不胜感激。