Difference between revisions of "Superformula"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
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> |