Lituus: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
<jsxgraph width="500" height="500" box="box1"> | <jsxgraph width="500" height="500" box="box1"> | ||
var b1 = JXG.JSXGraph.initBoard('box1', {axis:true,originX: 250, originY: 250, unitX: 25, unitY: 25}); | var b1 = JXG.JSXGraph.initBoard('box1', {axis:true,originX: 250, originY: 250, unitX: 25, unitY: 25}); | ||
var k = b1. | var k = b1.create('slider', [[1,8],[5,8],[0,1,4]]); | ||
var c = b1. | var c = b1.create('curve', [function(phi){return Math.sqrt(k.Value()/phi); }, [0, 0],0, 8*Math.PI], | ||
{curveType:'polar', strokewidth: | {curveType:'polar', strokewidth:1}); | ||
</jsxgraph> | </jsxgraph> | ||
Line 15: | Line 15: | ||
<jsxgraph width="500" height="500" box="box1"> | <jsxgraph width="500" height="500" box="box1"> | ||
var b1 = JXG.JSXGraph.initBoard('box1', {axis:true,originX: 250, originY: 250, unitX: 25, unitY: 25}); | var b1 = JXG.JSXGraph.initBoard('box1', {axis:true,originX: 250, originY: 250, unitX: 25, unitY: 25}); | ||
var k = b1. | var k = b1.create('slider', [[1,8],[5,8],[0,1,4]]); | ||
var c = b1. | var c = b1.create('curve', [function(phi){return Math.sqrt(k.Value()/phi); }, [0, 0],0, 8*Math.PI], | ||
{curveType:'polar', strokewidth: | {curveType:'polar', strokewidth:1}); | ||
</jsxgraph> | </jsxgraph> | ||
</source> | </source> |
Revision as of 07:46, 22 July 2010
A lituus is a spiral in which the angle is inversely proportional to the square of the radius (as expressed in polar coordinates).
- [math]\displaystyle{ r^2\theta = k \, }[/math]
The JavaScript code to produce this picture
<jsxgraph width="500" height="500" box="box1">
var b1 = JXG.JSXGraph.initBoard('box1', {axis:true,originX: 250, originY: 250, unitX: 25, unitY: 25});
var k = b1.create('slider', [[1,8],[5,8],[0,1,4]]);
var c = b1.create('curve', [function(phi){return Math.sqrt(k.Value()/phi); }, [0, 0],0, 8*Math.PI],
{curveType:'polar', strokewidth:1});
</jsxgraph>