comparison yetilab/plot/plot.yeti @ 117:098b4efde5b1

Some debug
author Chris Cannam
date Thu, 18 Apr 2013 09:46:34 +0100
parents 30c790d2789e
children ae802edb0561 789da8e322e1
comparison
equal deleted inserted replaced
116:44d745823a75 117:098b4efde5b1
12 import org.jzy3d.plot3d.rendering.canvas: Quality; 12 import org.jzy3d.plot3d.rendering.canvas: Quality;
13 13
14 newMatrixMapper matrix = 14 newMatrixMapper matrix =
15 (class MMapper extends Mapper 15 (class MMapper extends Mapper
16 double f(double x, double y) 16 double f(double x, double y)
17 matrix.getAt y x 17 result = matrix.getAt y x;
18 println "f(\(x),\(y)) -> \(result)";
19 result
18 end; 20 end;
19 new MMapper()); 21 new MMapper());
20 22
21 newMatrixLogMapper matrix = 23 newMatrixLogMapper matrix =
22 (class MMapper extends Mapper 24 (class MMapper extends Mapper
31 mapFunction x y 33 mapFunction x y
32 end; 34 end;
33 new FMapper()); 35 new FMapper());
34 36
35 plotMatrix matrix = 37 plotMatrix matrix =
36 (mapper = newMatrixLogMapper matrix; 38 (mapper = newMatrixMapper matrix;
37 size = matrix.size; 39 size = matrix.size;
38 xrange = new Range(1, size.columns - 1); 40 xrange = new Range(1, size.columns - 1);
39 yrange = new Range(1, size.rows - 1); 41 yrange = new Range(1, size.rows - 1);
40 grid = new OrthonormalGrid(xrange, size.columns, yrange, size.rows); 42 grid = new OrthonormalGrid(xrange, size.columns, yrange, size.rows);
41 println "Matrix size: \(size)"; 43 println "Matrix size: \(size)";
42 surface = Builder#buildOrthonormalBig(grid, mapper); //??? big? 44 surface = Builder#buildOrthonormal(grid, mapper); //??? big?
45 println "Z Bounds: \(surface#getBounds()#getZmin()) -> \(surface#getBounds()#getZmax())";
43 surface#setFaceDisplayed(false); 46 surface#setFaceDisplayed(false);
44 surface#setWireframeDisplayed(true); 47 surface#setWireframeDisplayed(true);
45 surface#setWireframeColor(Color#BLACK); 48 surface#setWireframeColor(Color#BLACK);
46 // chart = new Chart(Quality#Fastest, "swing"); 49 // chart = new Chart(Quality#Fastest, "swing");
47 chart = new Chart(Quality#Nicest); 50 chart = new Chart(Quality#Nicest);