# Difference between revisions of "JSXGraph and sound"

From JSXGraph Wiki

Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||

Line 8: | Line 8: | ||

Gibberish.Binops.export(); | Gibberish.Binops.export(); | ||

− | var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,10, | + | var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,10,10,-10], axis:true}); |

var slide = board.create('slider', [[10, 8], [60, 8], [100, 440, 1000]]); | 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( | + | var sinecurve = board.create('functiongraph', [function(x) { return 5 * Math.sin(440 * 2* Math.PI * x / 10); }]); |

board.on('update', function() { | board.on('update', function() { | ||

sinewave.frequency = slide.Value(); | sinewave.frequency = slide.Value(); |

## Revision as of 17:46, 6 February 2014

JSXGraph and sound