Inverse mapping of the power function: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 1: Line 1:
<jsxgraph width="600" height="400" box="jxgbox">
<jsxgraph width="600" height="400" box="jxgbox">
b = JXG.JSXGraph.initBoard('jxgbox', {originX: 220, originY: 300, unitX: 40, unitY: 40});
b = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-5.5, 7.5, 9.5, -2.5], axis: true});
b.suspendUpdate();
b.suspendUpdate();
b.create('axis', [[0,0], [1,0]], {});
b.create('axis', [[0,0], [0,1]], {});


var n = b.create('slider',[[-5,-1],[5,-1],[-5,1,5]],{name:'n'});
var n = b.create('slider',[[-5,-1],[5,-1],[-5,1,5]],{name:'n'});
Line 13: Line 11:


<source lang="javascript">
<source lang="javascript">
b = JXG.JSXGraph.initBoard('jxgbox', {originX: 220, originY: 300, unitX: 40, unitY: 40});
b = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-5.5, 7.5, 9.5, -2.5], axis: true});
b.suspendUpdate();
b.suspendUpdate();
b.create('axis', [[0,0], [1,0]], {});
b.create('axis', [[0,0], [0,1]], {});


var n = b.create('slider',[[-5,-1],[5,-1],[-5,1,5]],{name:'n'});
var n = b.create('slider',[[-5,-1],[5,-1],[-5,1,5]],{name:'n'});

Revision as of 07:56, 8 June 2011

b = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-5.5, 7.5, 9.5, -2.5], axis: true});
b.suspendUpdate();

var n = b.create('slider',[[-5,-1],[5,-1],[-5,1,5]],{name:'n'});
b.create('functiongraph', [function(t){ return t}],{strokeColor:'#000000',dash:1,strokeWidth:1});
b.create('functiongraph', [function(t){ return b.pow(t,n.Value()); },0.001,8],{strokeColor:'#ff0000'});
b.create('functiongraph', [function(t){ return b.pow(t,1/n.Value()); },0.001,8],{strokeColor:'#ff0000',dash:2});
b.unsuspendUpdate();