Rolling Reuleaux pentagon: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 15: Line 15:
// Pentagon
// Pentagon
var A = brd.create('point',[-2,-2]);
var A = brd.create('point',[-2,-2]);
var B = brd.create('point',[2,-2]);
var B = brd.create('point',[2,0]);
var pol5 = brd.create('regularpolygon',[A,B,5], {withLines:false, fillColor:'none', highlightFillColor:'none', fillOpacity:0.0});
var pol5 = brd.create('regularpolygon',[A,B,5], {withLines:false, fillColor:'none', highlightFillColor:'none', fillOpacity:0.0});
for (var i=0;i<5;i++) pol5.vertices[i].setProperty({color:'#3d1c24'});
for (var i=0;i<5;i++) pol5.vertices[i].setProperty({color:'#3d1c24'});
Line 33: Line 33:
brd.unsuspendUpdate();
brd.unsuspendUpdate();


var rol5 = JXG.Math.Numerics.createRoulette(line, reuleauxPentagon, 6*Math.PI/5, Math.PI/90, 1, 10, [A,B,C,D]);  
var rol5 = JXG.Math.Numerics.createRoulette(line, reuleauxPentagon, -2, Math.PI/90, 1, 10, [A,B,C,D]);  
var rol3 = JXG.Math.Numerics.createRoulette(reuleauxPentagon, reuleauxTriangle, 6*Math.PI/5, Math.PI/90, -1, 10, [C,D]);  
var rol3 = JXG.Math.Numerics.createRoulette(reuleauxPentagon, reuleauxTriangle, 6*Math.PI/5, Math.PI/90, -1, 10, [C,D]);  
var rollIt = function() {
var rollIt = function() {

Revision as of 20:27, 3 October 2010

The underlying JavaScript code