Rolling circle on circle: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5], keepaspectratio:true}); | var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5], keepaspectratio:true}); | ||
brd.suspendUpdate(); | brd.suspendUpdate(); | ||
// Big circle | // Big circle | ||
var bigCircle = brd.create('curve', [ | var bigCircle = brd.create('curve', [ | ||
Line 18: | Line 17: | ||
// 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',[ | var C = brd.create('point',[1,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 30: | Line 29: | ||
// Point on circle | // Point on circle | ||
var B = brd.create('glider',[0,2,circle],{name:'B', color:'blue',trace: | var B = brd.create('glider',[0,2,circle],{name:'B', color:'blue',trace:false}); | ||
brd.create('segment',[C,B],{color:'black'}); | brd.create('segment',[C,B],{color:'black'}); | ||
brd.unsuspendUpdate(); | brd.unsuspendUpdate(); |