Difference between revisions of "Superformula"

From JSXGraph Wiki
Jump to navigationJump to search
(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', [...)
 
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.sin(m.Value()*phi*0.25/b.Value()),n3.Value()),-1/n1.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()),
 +
                            -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>

Revision as of 17:44, 18 March 2009