| 42 | } |
| 43 | |
| 44 | public void setRandomVals() { |
| 45 | System.out.println("GSPlotTest.setRandomVals"); |
| 46 | double[][][] data=griddata.getData(); |
| 47 | double[][] dataR = data[0]; |
| 48 | // double[][] dataG = data[1]; |
| 49 | // double[][] dataB = data[2]; |
| 50 | double r = Math.random(); |
| 51 | for(int i=0; i<numpts; i++ ) { |
| 52 | for(int j=0; j<numpts; j++ ) { |
| 53 | // dataR[i][j]=255*Math.random(); |
| 54 | // dataG[i][j]=255*Math.random(); |
| 55 | // dataB[i][j]=255*Math.random(); |
| 56 | dataR[i][j]=(r > 0.7 ? 255.0 * i/ numpts : r > 0.5 ? 255.0 * j /numpts : 255.0 * i/ numpts * j /numpts); |
| 57 | // green and blue are not used in this -- just amplitude (R) |
| 58 | } |
| 59 | } |
| 60 | grayscalePlot.update(); |
| 61 | } |
| 62 | |
| 63 | |
| 64 | |