我正在查看给定的IsoSurface示例代码。我想创建一个类似于示例代码的图表,但是我无法重新创建所需的数据点(因为它使用的是fillSampleValues())。示例(如下所示)使用了什么值?谢谢!
编辑:我特别感兴趣的是如何使它变得平坦,以及如何创建峰值。当我尝试输入我自己的x,y,z值时,图表没有显示出来。我猜这是因为我没有输入有效的值。这就是为什么我很想看看fillSampleValues是什么,以及它是如何创建图表的。
series = Series.createNewSeries(chart.getChart(), IsoSurface.class, null);
series.fillSampleValues();
chart.addSeries(series);
chart.getLegend().setAlignment(LegendAlignment.BOTTOM);
chart.getHeader().setText("ISOSurface Series");
chart.getHeader().getFont().setSize(14);
chart.getAspect().setOrthogonal(false);
chart.getAspect().setZoom(70);
chart.getAspect().setRotation(320);
chart.getAspect().setElevation(340);
chart.getAspect().setPerspective(37);
chart.getAspect().setChart3DPercent(90);
((IsoSurface) series).setPaletteStyle(PaletteStyle.RAINBOW);发布于 2013-07-02 22:04:40
曲面系列中的随机值的计算方法如下例所示:
Surface surf1 = new Surface(tChart1.getChart());
int nValues = 10;
for (int z=1; z<=nValues; z++) {
for (int x=1; x<=nValues; x++) {
surf1.add(x, 0.5 * Utils.pow(Math.cos(x / (nValues * 0.2)), 2) +
Utils.pow(Math.cos(z / (nValues * 0.2)), 2) -
Math.cos(z / (nValues * 0.5)), z);
}
}https://stackoverflow.com/questions/17371412
复制相似问题