Inverse mapping of the power function: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
<div id="jxgbox" class="jxgbox" style="width:600px; height:400px;"></div> | <div id="jxgbox" class="jxgbox" style="width:600px; height:400px;"></div> | ||
<script language="JavaScript"> | <script language="JavaScript"> | ||
b = JXG.JSXGraph.initBoard('jxgbox', {originX: | b = JXG.JSXGraph.initBoard('jxgbox', {originX: 2000, originY: 300, unitX: 40, unitY: 20}); | ||
b.suspendUpdate(); | b.suspendUpdate(); | ||
b.createElement('axis', [[0,0], [1,0]], {}); | b.createElement('axis', [[0,0], [1,0]], {}); | ||
Line 12: | Line 12: | ||
var n = b.createElement('slider',[[-5,-2],[5,-2],[-5,1,5]],{name:'n'}); | var n = b.createElement('slider',[[-5,-2],[5,-2],[-5,1,5]],{name:'n'}); | ||
b.createElement('curve', [function(t){ return t; }, function(t){ return t}, "t"],{strokeColor:'#000000',dash:1,strokeWidth:1}); | b.createElement('curve', [function(t){ return t; }, function(t){ return t}, "t"],{strokeColor:'#000000',dash:1,strokeWidth:1}); | ||
b.createElement('curve', [function(t){ return t; }, function(t){ return b.pow(t,n.X()); }, "t",0.001, | b.createElement('curve', [function(t){ return t; }, function(t){ return b.pow(t,n.X()); }, "t",0.001,8],{strokeColor:'#ff0000'}); | ||
b.createElement('curve', [function(t){ return t; }, function(t){ return b.pow(t,1/n.X()); }, "t",0.001, | b.createElement('curve', [function(t){ return t; }, function(t){ return b.pow(t,1/n.X()); }, "t",0.001,8],{strokeColor:'#ff0000',dash:2}); | ||
b.unsuspendUpdate(); | b.unsuspendUpdate(); | ||
</script> | </script> |
Revision as of 11:02, 30 January 2009
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" />
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/prototype.js"></script>
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
<div id="jxgbox" class="jxgbox" style="width:600px; height:400px;"></div>