Reflect images: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 1: Line 1:
<jsxgraph width="600" height="500">
<jsxgraph width="600" height="500">
(function(){
(function(){
   var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-6,6,12,-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, p4, p5,
       l1, l2,
       l1, l2,
Line 10: Line 10:


   // Define two line through four points
   // Define two line through four points
   p0 = brd.createElement('point', [0,3]);  
   p0 = brd.createElement('point', [2,-2]);  
   p1 = brd.createElement('point', [1,1]);  
   p1 = brd.createElement('point', [2,1]);  
   p2 = brd.createElement('point', [-3,4]);  
   p2 = brd.createElement('point', [0,3]);  
   p3 = brd.createElement('point', [10,4]);  
   p3 = brd.createElement('point', [2,-2]);  


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

Revision as of 11:54, 29 July 2011

The JavaScript code

Here is the complete code to accomplish this behaviour.