Spirograph: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) 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); | ||
}, | }, |