Spirograph: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 8: Line 8:
     function(t){  
     function(t){  
         var r1 = Math.round(100.0*r.Value())/100.0;  
         var r1 = Math.round(100.0*r.Value())/100.0;  
        var a1 = Math.round(100.0*a.Value())/100.0;
         return (R-r1)*Math.cos(r1/R*t)+a1*Math.cos((1-r1/R)*t);  
         return (R-r1)*Math.cos(r1/R*t)+a1*Math.cos((1-r1/R)*t);  
     },
     },

Revision as of 15:10, 19 July 2010

The underlying JavaScript code