Spirograph: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5], kkeepaspectratio:true}); | var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5], kkeepaspectratio:true}); | ||
var R = 2.0; | var R = 2.0; | ||
var r = brd.create('slider',[[-3,4],[3,4],[-5,1,5]],{name:'r',snapWidth:0. | var r = brd.create('slider',[[-3,4],[3,4],[-5,1,5]],{name:'r',snapWidth:0.2}); | ||
var a = brd.create('slider',[[-3,3],[3,3],[-5,1,5]],{name:'a',snapWidth:0. | var a = brd.create('slider',[[-3,3],[3,3],[-5,1,5]],{name:'a',snapWidth:0.2}); | ||
var c = brd.create('curve',[ | var c = brd.create('curve',[ | ||
Line 17: | Line 17: | ||
], {strokeWidth:3, strokeColor:'#3355ff', strokeOpacity:0.7}); | ], {strokeWidth:3, strokeColor:'#3355ff', strokeOpacity:0.7}); | ||
</jsxgraph> | </jsxgraph> | ||
===The underlying JavaScript code=== | |||
<source lang="javascript"> | |||
</source> | |||
[[Category:Examples]] | |||
[[Category:Curves]] |