Cosine: Difference between revisions
From JSXGraph Wiki
Bookofproofs (talk | contribs) No edit summary |
Bookofproofs (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<jsxgraph box="boxR" width="500" height="500"> | <jsxgraph box="boxR" width="500" height="500"> | ||
Line 23: | Line 22: | ||
</jsxgraph> | </jsxgraph> | ||
<jsxgraph box="box" width="500" height="500"> | |||
var brd = JXG.JSXGraph.initBoard('box', {boundingbox: [-1.5, 1.5, 1.5, -1.5], axis:true}); | |||
brd1.addChild(brd); | |||
var ax = brd.create('line',[[0,0],[1,0]],{visible:false}); | |||
var ay = brd.create('line',[[0,0],[0,1]],{visible:false}); | |||
var p0 = brd.create('point',[0,0],{fixed:true,visible:false}); | |||
var p1 = brd.create('point',[1,0],{name:'',visible:false,fixed:true}); | |||
var c = brd.create('circle',[p0,p1],{dash:2,strokeWidth:1,strokeOpacity:0.6}); | |||
var p2 = brd.create('point',[Math.cos(x.X()),Math.sin(x.X())],{name:'exp(ix)',fixed:true,size:1, strokeColor:'green'}); | |||
var p3 = brd.create('point',[function(){return p2.X();},0.0],{visible:false,name:'',withLabel:false}); | |||
var p4 = brd.create('point',[0.0,function(){return p2.Y();}],{visible:false,name:'',withLabel:false}); | |||
brd.create('line',[p2,p4],{straightFirst:false,straightLast:false,strokeColor:'red'}); // cos | |||
brd.create('text',[ | |||
function(){return (p2.X()+p4.X())*0.3;}, | |||
function(){return p2.Y()+0.05;}, | |||
'cos'],{}); | |||
</jsxgraph> | |||
[[Category:Contributions]] | [[Category:Contributions]] |