Rolling circle on circle: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 18: Line 18:
// Circle
// Circle
var P = brd.create('point',[4,0],{name:'P', trace:false});
var P = brd.create('point',[4,0],{name:'P', trace:false});
var C = brd.create('point',[1,0],{name:'C'});
var C = brd.create('point',[2,0],{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),
Line 34: Line 34:


// Point on circle
// Point on circle
var B = brd.create('glider',[0,2,circle],{name:'B', color:'blue',trace:false});
var B = brd.create('glider',[0,2,circle],{name:'B', color:'blue',trace:true});
brd.create('segment',[C,B],{color:'black'});  
brd.create('segment',[C,B],{color:'black'});  
brd.unsuspendUpdate();
brd.unsuspendUpdate();
var rol = JXG.Math.Numerics.createRoulette(bigCircle, circle, 0, Math.PI/45, -1, 50, [C,P,B]);  
var rol = JXG.Math.Numerics.createRoulette(bigCircle, circle, 0, Math.PI/18, -1, 15, [C,P,B]);  


</jsxgraph>
</jsxgraph>

Revision as of 07:56, 6 October 2010

The underlying JavaScript code