Nowhere differentiable continuous function: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 12: | Line 12: | ||
}; | }; | ||
var c = bd.create('functiongraph', [f], {doAdvancedPlot:false, numberPointsHigh:15000, numberPointsLow:1000, strokeWidth:1}); | var c = bd.create('functiongraph', [f], {doAdvancedPlot:false, numberPointsHigh:15000, numberPointsLow:1000, strokeWidth:1}); | ||
</jsxgraph> | |||
=== Reference === | |||
Wei-Chi Yang, "Technology has shaped up mathematics comunities", | |||
Proceedings of the Sixteenth Asian Technology Conference in Mathmatics (ATCM 16), pp 81-96. | |||
=== The underlying JavaScript code === | |||
<source lang="javascript"> | |||
var bd = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox: [-5, 3, 5, -3]}); | |||
var a = bd.create('slider', [[0.5,2],[2.5,2],[0,0.3,1]], {name:'a'}); | |||
var b = bd.create('slider', [[0.5,1.5],[2.5,1.5],[0,20,100]], {name:'b'}); | |||
var N = bd.create('slider', [[0.5,1.0],[2.5,1.0],[0,2,30]], {name:'N'}); | |||
var f = function(x){ | |||
var i, s=0.0, n = N.Value(), aa= a.Value(), bb = b.Value(); | |||
for (i=0; i<n; i++) { | |||
s += Math.pow(aa,i)*Math.cos(Math.pow(bb,i)*Math.PI*x); | |||
} | |||
return s; | |||
}; | |||
var c = bd.create('functiongraph', [f], { | |||
doAdvancedPlot:false, | |||
numberPointsHigh:15000, numberPointsLow:1000, | |||
strokeWidth:1}); | |||
</source> | |||
[[Category:Examples]] | [[Category:Examples]] | ||
[[Category:Curves]] | [[Category:Curves]] |
Revision as of 18:06, 19 September 2011
Reference
Wei-Chi Yang, "Technology has shaped up mathematics comunities", Proceedings of the Sixteenth Asian Technology Conference in Mathmatics (ATCM 16), pp 81-96.
The underlying JavaScript code
var bd = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox: [-5, 3, 5, -3]});
var a = bd.create('slider', [[0.5,2],[2.5,2],[0,0.3,1]], {name:'a'});
var b = bd.create('slider', [[0.5,1.5],[2.5,1.5],[0,20,100]], {name:'b'});
var N = bd.create('slider', [[0.5,1.0],[2.5,1.0],[0,2,30]], {name:'N'});
var f = function(x){
var i, s=0.0, n = N.Value(), aa= a.Value(), bb = b.Value();
for (i=0; i<n; i++) {
s += Math.pow(aa,i)*Math.cos(Math.pow(bb,i)*Math.PI*x);
}
return s;
};
var c = bd.create('functiongraph', [f], {
doAdvancedPlot:false,
numberPointsHigh:15000, numberPointsLow:1000,
strokeWidth:1});