Difference between revisions of "Mutually dependent line and gliders"

From JSXGraph Wiki
Jump to navigationJump to search
Line 14: Line 14:
 
var line = board.create('line', [0,0,1]);
 
var line = board.create('line', [0,0,1]);
  
/*
+
 
 
var offset = gl2.Y() - gl1.Y();
 
var offset = gl2.Y() - gl1.Y();
  
 
gl1.on('drag', function() {
 
gl1.on('drag', function() {
 
     gl2.moveTo([gl1.X(), gl1.Y() + offset]);
 
     gl2.moveTo([gl1.X(), gl1.Y() + offset]);
                });
+
    });
 
gl2.on('drag', function() {
 
gl2.on('drag', function() {
 
     offset = gl2.Y() - gl1.Y();
 
     offset = gl2.Y() - gl1.Y();
                });
+
    var v = JXG.Math.Geometry.crossProduct(gl1.coords.usrCoords,gl2.coords.usrCoords);
*/
+
    });
 +
 
  
 
</jsxgraph>
 
</jsxgraph>

Revision as of 08:56, 1 June 2012