Superformula: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 7: Line 7:
  var n2 = b2.createElement('slider', [[1,4],[5,4],[0,4,20]]);
  var n2 = b2.createElement('slider', [[1,4],[5,4],[0,4,20]]);
  var n3 = b2.createElement('slider', [[1,3],[5,3],[0,4,20]]);
  var n3 = b2.createElement('slider', [[1,3],[5,3],[0,4,20]]);
  var len = b2.createElement('slider', [[1,7],[5,7],[0,2,2]]);  
  var len = b2.createElement('slider', [[1,2],[5,2],[0,2,2]]);  
  var c = b2.createElement('curve', [
  var c = b2.createElement('curve', [
         function(phi){return b2.pow(
         function(phi){return b2.pow(
Line 14: Line 14:
                             -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:1,fillColor:'#765412'});       
</jsxgraph>
</jsxgraph>

Revision as of 15:46, 18 March 2009