Difference between revisions of "Cosine"

From JSXGraph Wiki
Jump to navigationJump to search
Line 30: Line 30:
 
var x = brd1.create('glider',[-9,0,xr],{visible:true, name:'x'});
 
var x = brd1.create('glider',[-9,0,xr],{visible:true, name:'x'});
 
var y = brd1.create('point',[x.X(),Math.cos(x.X())],{size:1,name:'',strokeColor:'green'});
 
var y = brd1.create('point',[x.X(),Math.cos(x.X())],{size:1,name:'',strokeColor:'green'});
console.log("test1");
+
 
 
var x1 = brd1.create('segment',[x,y],{visible:true, straightFirst:false,straightLast:false,strokeColor:'red'});
 
var x1 = brd1.create('segment',[x,y],{visible:true, straightFirst:false,straightLast:false,strokeColor:'red'});
 
  x.on('drag', function(){ transform(x);});
 
  x.on('drag', function(){ transform(x);});
Line 36: Line 36:
 
return Math.cos(x);  
 
return Math.cos(x);  
 
}]);
 
}]);
 +
 +
console.log("test2");
 
var ax = brd.create('line',[[0,0],[1,0]],{visible:false});
 
var ax = brd.create('line',[[0,0],[1,0]],{visible:false});
 
var ay = brd.create('line',[[0,0],[0,1]],{visible:false});
 
var ay = brd.create('line',[[0,0],[0,1]],{visible:false});

Revision as of 14:42, 5 March 2016

Complex PlaneCosine Graph