Superformula: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
var c = b2.createElement('curve', [ | var c = b2.createElement('curve', [ | ||
function(phi){return b2.pow( | 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.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()), | b2.pow(Math.abs(Math.sin( m.Value()*phi*0.25/b.Value() )),n3.Value()), | ||
-1/n1.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> |