Reflect images: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 2: Line 2:
(function(){
(function(){
   var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,5,13,-2.5], axis:true});
   var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,5,13,-2.5], axis:true});
   var p0, p1, p2, p3, p4, p5,
   var p0, p1, p2, p3, p5,
       l1, l2,
       l1, l2,
       im1, im2, im3,  
       im1, im2, im3,  
Line 12: Line 12:
   p0 = brd.createElement('point', [2,-2]);  
   p0 = brd.createElement('point', [2,-2]);  
   p1 = brd.createElement('point', [2,1]);  
   p1 = brd.createElement('point', [2,1]);  
   p2 = brd.createElement('point', [0,3]);
   p2 = brd.createElement('point', [10,-1]);  
  p3 = brd.createElement('point', [10,-1]);  


   l1 = brd.createElement('line', [p0, p1]);  
   l1 = brd.createElement('line', [p0, p1]);  
   l2 = brd.createElement('line', [p2, p3]);  
   l2 = brd.createElement('line', [p0, p2]);  


   p4 = brd.createElement('point', [-2,-2]);  
   p4 = brd.createElement('point', [-2,-2]);  

Revision as of 11:56, 29 July 2011

The JavaScript code

Here is the complete code to accomplish this behaviour.