Animations: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 6: | Line 6: | ||
brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-2,2,2,-2], keepaspectratio:true, axis:true}); | brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-2,2,2,-2], keepaspectratio:true, axis:true}); | ||
p = brd.createElement('point',[1.5,1.5],{face:'o', size:8, strokeColor:'red', fillOpacity:0.6, strokeOpacity: 0.6}); | p = brd.createElement('point',[1.5,1.5],{face:'o', size:8, strokeColor:'red', fillOpacity:0.6, strokeOpacity: 0.6}); | ||
p = brd.createElement('segment',[[0,0],p],{dash:3}); | |||
</jsxgraph> | </jsxgraph> | ||
Revision as of 12:16, 30 September 2009
Click here, to start animation 1 Click here, to start animation 2
The JavaScript code
<span onClick="p.visit([-1.5,-1.5],1000,2)" style="color:blue">Click here, to start animation 1</span>
<span onClick="p.moveTo([-1.5,1.5],1000)" style="color:red">Click here, to start animation 2</span>
<jsxgraph width="500" height="500">
brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-2,2,2,-2], keepaspectratio:true, axis:true});
p = brd.createElement('point',[1.5,1.5],{face:'o', size:8, strokeColor:'red', fillOpacity:0.6, strokeOpacity: 0.6});
</jsxgraph>