P-Norm: Difference between revisions

From JSXGraph Wiki
(New page: <jsxgraph width="500" height="500"> var brd = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox:[-5,5,5,-5]}); var pNorm = brd.create('slider', [[0,-1],[3,-1],[0,2,10]], {style:6, n...)
 
No edit summary
Line 5: Line 5:
   function(t){
   function(t){
       var p = pNorm.Value();
       var p = pNorm.Value();
       return 2.0/Math.pow(Math.pow(Math.abs(Math.cos(t)),p)+Math.pow(Math.abs(Math.sin(t)),p)),1.0/p);
       return 2.0/Math.pow(
                Math.pow(Math.abs(Math.cos(t)),p)+
                Math.pow(Math.abs(Math.sin(t)),p)),1.0/p
                );
   }
   }
   [0,0],  
   [0,0],  

Revision as of 20:28, 1 July 2010

The underlying JavaScript code