2013-06-28 1 views
0

IsoSurface에 대한 주어진 예제 코드를보고 있습니다. 예제 코드와 비슷한 모양의 차트를 만들고 싶지만 fillSampleValues ​​()를 사용하기 때문에 데이터 포인트를 다시 만들 수는 없습니다. 예제 (아래 그림 참조)는 어떤 값을 사용합니까? 감사!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); 

답변

1

랜덤 값은 다음의 예에서와 같이 계산된다 :

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); 
    } 
}