Cosine: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 23: Line 23:


<script language="javascript" type="text/javascript">
<script language="javascript" type="text/javascript">
console.log("test");
 
var brd1 = JXG.JSXGraph.initBoard('boxR', {boundingbox: [-10, 1.5, 10, -1.5], axis:true});
var brd1 = JXG.JSXGraph.initBoard('boxR', {boundingbox: [-10, 1.5, 10, -1.5], axis:true});
var brd = JXG.JSXGraph.initBoard('box', {boundingbox: [-1.5, 1.5, 1.5, -1.5], axis:true});
var brd = JXG.JSXGraph.initBoard('box', {boundingbox: [-1.5, 1.5, 1.5, -1.5], axis:true});
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);});

Revision as of 13:42, 5 March 2016

Complex PlaneCosine Graph