JSXGraph and sound: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,10,100,-10], axis:true}); | var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,10,100,-10], axis:true}); | ||
var slide = board.create('slider', [[10, | var slide = board.create('slider', [[10, 8], [60, 8], [100, 440, 1000]]); | ||
var sinewave = new Gibberish.Sine( 440, .25 ).connect(); | var sinewave = new Gibberish.Sine( 440, .25 ).connect(); | ||
var sinecurve = board.create('functiongraph', [function(x) { return 5 * Math.sin(2* Math.PI * x / 100 | var sinecurve = board.create('functiongraph', [function(x) { return 5 * Math.sin(44 * 2* Math.PI * x / 100); }]); | ||
board.on('update', function() { | board.on('update', function() { | ||
sinewave.frequency = slide.Value(); | sinewave.frequency = slide.Value(); |
Revision as of 15:45, 6 February 2014
JSXGraph and sound