Polygon II: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-3,3,3,-3]}); | var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-3,3,3,-3]}); | ||
var p1 = brd.create('point',[-1,-1]); | var p1 = brd.create('point',[-1,-1]); | ||
var c1 = brd.create('circle',[p1,2],{strokeOpacity:0.1}); | var c1 = brd.create('circle',[p1,2],{strokeOpacity:0.1}); | ||
var p2 = brd.create('glider',[1,-1,c1]); | var p2 = brd.create('glider',[1,-1,c1]); | ||
var rot = brd.create('transform',[function(){ return Math.PI/4;},p1],{type:'rotate'}); | var rot = brd.create('transform',[function(){ return Math.PI/4;},p1],{type:'rotate'}); | ||
var p3 = brd.create('point',[p2,rot],{fixed:true}); | var p3 = brd.create('point',[p2,rot],{fixed:true,name:'h1'}); | ||
var line = brd.create('line',[p1,p3],{strokeOpacity:0.1}); | var line = brd.create('line',[p1,p3],{strokeOpacity:0.1}); | ||
var p4 = brd.create('glider',[0,0.5,line],{fixed:true}); | var p4 = brd.create('glider',[0,0.5,line],{fixed:true}); | ||
var poly = brd.create('polygon',[p1,p2,p3], {fillOpacity:0.05}); | var poly = brd.create('polygon',[p1,p2,p3], {fillOpacity:0.05}); | ||
</jsxgraph> | </jsxgraph> |