Semicubical parabola: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) (New page: A semicubical parabola is a curve defined parametrically as :<math> x = t^2 </math> :<math> y = at^3 </math> <jsxgraph width="600" height="600"> (function(){ var brd = JXG.JSXGraph.init...) |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
<jsxgraph width="600" height="600"> | <jsxgraph width="600" height="600"> | ||
(function(){ | (function(){ | ||
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-1,2,3,-2], keepaspectratio:true}); | var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-1,2,3,-2], keepaspectratio:true, axis:true}); | ||
brd.suspendUpdate(); | brd.suspendUpdate(); | ||
var a = brd.create('slider',[[- | var a = brd.create('slider',[[-0.5,1.8],[1,1.8],[-5,0.20,5]], {name:'a'}); | ||
var p = brd.create('curve', | var p = brd.create('curve', | ||
Line 26: | Line 26: | ||
===The underlying JavaScript code=== | ===The underlying JavaScript code=== | ||
<source lang="javascript"> | <source lang="javascript"> | ||
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-1,2,3,-2], keepaspectratio:true}); | var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-1,2,3,-2], keepaspectratio:true, axis:true}); | ||
brd.suspendUpdate(); | brd.suspendUpdate(); | ||
var a = brd.create('slider',[[-1,1.8],[1,1.8],[-5,0.20,5]], {name:'a'}); | var a = brd.create('slider',[[-1,1.8],[1,1.8],[-5,0.20,5]], {name:'a'}); |
Revision as of 09:32, 13 January 2011
A semicubical parabola is a curve defined parametrically as
- [math]\displaystyle{ x = t^2 }[/math]
- [math]\displaystyle{ y = at^3 }[/math]
References
The underlying JavaScript code
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-1,2,3,-2], keepaspectratio:true, axis:true});
brd.suspendUpdate();
var a = brd.create('slider',[[-1,1.8],[1,1.8],[-5,0.20,5]], {name:'a'});
var p = brd.create('curve',
[function(t){ return t*t;},
function(t){ return a.Value()*t*t*t;}
],
{strokeWidth:2, strokeColor:'black'});
brd.unsuspendUpdate();