Difference between revisions of "Spirograph"

From JSXGraph Wiki
Jump to navigationJump to search
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 17:10, 19 July 2010

The underlying JavaScript code