Superformula: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) (New page: <jsxgraph width="500" height="500" box="box2"> var b2 = JXG.JSXGraph.initBoard('box2', {axis:true,originX: 250, originY: 250, unitX: 25, unitY: 25}); var a = b2.createElement('slider', [...) |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
var len = b2.createElement('slider', [[1,7],[5,7],[0,2,2]]); | var len = b2.createElement('slider', [[1,7],[5,7],[0,2,2]]); | ||
var c = b2.createElement('curve', [ | var c = b2.createElement('curve', [ | ||
function(phi){return b2.pow(b2.pow(Math.abs(Math.cos(m.Value()*phi*0.25/a.Value()),n2.Value())+ | function(phi){return b2.pow( | ||
b2.pow(Math.abs(Math.cos( m.Value()*phi*0.25/a.Value() ),n2.Value())+ | |||
b2.pow(Math.abs(Math.sin( m.Value()*phi*0.25/b.Value() ),n3.Value()), | |||
-1/n1.Value()); }, | |||
[0, 0],0, function(){return len.Value()*Math.PI;}], | [0, 0],0, function(){return len.Value()*Math.PI;}], | ||
{curveType:'polar', strokewidth:2}); | {curveType:'polar', strokewidth:2}); | ||
</jsxgraph> | </jsxgraph> |