Trochoid: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
<div id="jsxgbox" class="jxgbox" style="width:500px; height:500px;"></div> | <div id="jsxgbox" class="jxgbox" style="width:500px; height:500px;"></div> | ||
<script language="JavaScript"> | <script language="JavaScript"> | ||
board = JXG.JSXGraph.initBoard('jsxgbox', {originX: 250, originY: 250, unitX: | board = JXG.JSXGraph.initBoard('jsxgbox', {originX: 250, originY: 250, unitX: 25, unitY: 25}); | ||
board.createElement('axis', [[0,0],[1,0]]); | board.createElement('axis', [[0,0],[1,0]]); | ||
board.createElement('axis', [[0,0],[0,1]]); | board.createElement('axis', [[0,0],[0,1]]); | ||
Line 12: | Line 12: | ||
var x = function(phi) { return a.Value()*phi-b.Value()*Math.sin(phi); } | var x = function(phi) { return a.Value()*phi-b.Value()*Math.sin(phi); } | ||
var y = function(phi) { return a.Value()-b.Value()*Math.cos(phi); } | var y = function(phi) { return a.Value()-b.Value()*Math.cos(phi); } | ||
c1 = board.createElement('curve', [x,y,'phi', | c1 = board.createElement('curve', [x,y,'phi',-Math.PI*4,Math.PI*4],{strokeWidth:3}); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 16:55, 5 February 2009