Difference between revisions of "Rolling Reuleaux triangle"

From JSXGraph Wiki
Jump to: navigation, search
(New page: <jsxgraph width="0" height="0" box="nix"></jsxgraph> <html> <script type="text/javascript" src="/~alfred/jsxgraph/trunk/src/Roulette.js"></script> <form> <input type="button" value="start"...)
 
Line 17: Line 17:
 
var B = brd.create('point',[0,0]);
 
var B = brd.create('point',[0,0]);
 
var pol3 = brd.create('regularpolygon',[A,B,3], {withLines:false, fillColor:'none', highlightFillColor:'none', fillOpacity:0.0});
 
var pol3 = brd.create('regularpolygon',[A,B,3], {withLines:false, fillColor:'none', highlightFillColor:'none', fillOpacity:0.0});
for (var i=0;i<5;i++) pol3.vertices[i].setProperty({color:'#3d1c24'});
+
for (var i=0;i<3;i++) pol3.vertices[i].setProperty({color:'#3d1c24'});
  
 
var line = brd.create('curve',[function(t){return t;}, function(t){return -2;}],  
 
var line = brd.create('curve',[function(t){return t;}, function(t){return -2;}],  
Line 25: Line 25:
 
brd.unsuspendUpdate();
 
brd.unsuspendUpdate();
  
var rol3 = JXG.Math.Numerics.createRoulette(line, reuleauxTriangle, -2, Math.PI/90, 1, 50, [A,B,C,D]);  
+
var rol3 = JXG.Math.Numerics.createRoulette(line, reuleauxTriangle, -2, Math.PI/90, 1, 50, [A,B]);  
 
</jsxgraph>
 
</jsxgraph>
  

Revision as of 16:39, 4 October 2010

The underlying JavaScript code