Lattices: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 3: Line 3:
var b1 = brd.createElement('point', [1,0], {style:6,name:''});
var b1 = brd.createElement('point', [1,0], {style:6,name:''});
var b2 = brd.createElement('point', [0,1], {style:6,name:''});
var b2 = brd.createElement('point', [0,1], {style:6,name:''});
var v1 = brd.createElement('vector', [[0,0],b1]);  
//var v1 = brd.createElement('vector', [[0,0],b1]);  
var v2 = brd.createElement('vector', ['Origin',b2]);  
//var v2 = brd.createElement('vector', ['Origin',b2]);  
var i, j;
for (i=-5;i<6;i++) for (j=-5;j<6;j++) {
  brd.createElement('point',[
      function(){ return i*b1.X()+j*b2.X(); },
      function(){ return i*b1.Y()+j*b2.Y(); }
      ], {name:''});
}
 
</jsxgraph>
</jsxgraph>


[[Category:Examples]]
[[Category:Examples]]

Revision as of 07:20, 20 April 2009