Polygon II: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 8: Line 8:
var rot = brd.create('transform',[function(){ return Math.atan2(p2.Y()-p1.Y(),p2.X()-p1.X());},p1],{type:'rotate'});
var rot = brd.create('transform',[function(){ return Math.atan2(p2.Y()-p1.Y(),p2.X()-p1.X());},p1],{type:'rotate'});
rot.bindTo(p3);
rot.bindTo(p3);
brd.create('group',[p1,p3]);


var poly = brd.create('polygon',[p1,p2,p3], {fillOpacity:0.05});
var poly = brd.create('polygon',[p1,p2,p3], {fillOpacity:0.05});


</jsxgraph>
</jsxgraph>

Revision as of 10:43, 3 March 2010