# Difference between revisions of "Rolling circle on line"

From JSXGraph Wiki

Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||

Line 20: | Line 20: | ||

var C = brd.create('point',[0,2],{name:'C'}); | var C = brd.create('point',[0,2],{name:'C'}); | ||

var circle = brd.create('curve',[ | var circle = brd.create('curve',[ | ||

− | function(t){var d = P.Dist(C); | + | function(t){var d = P.Dist(C), |

+ | beta = JXG.Math.Geometry.rad([C.X()+1,C.Y()],C,P); | ||

+ | t += beta; | ||

return C.X()+d*Math.cos(t); | return C.X()+d*Math.cos(t); | ||

}, | }, | ||

− | function(t){var d = P.Dist(C); | + | function(t){var d = P.Dist(C), |

+ | beta = JXG.Math.Geometry.rad([C.X()+1,C.Y()],C,P); | ||

+ | t += beta; | ||

return C.Y()+d*Math.sin(t); | return C.Y()+d*Math.sin(t); | ||

}, | }, |