Polygon II

The triangle ABC can be moved by dragging A and it can be rotated around A by moving B.

The underlying JavvaScript code

For the elements c1, p3, line the attribute visible should be set to false.

varbrd=JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-3,3,3,-3]});varp1=brd.create('point',[-1,-1]);varc1=brd.create('circle',[p1,3],{strokeOpacity:0.1});// varp2=brd.create('glider',[2,-1,c1]);// p2 glides on circle c1varrot=brd.create('transform',[function(){returnMath.PI/4;},p1],{type:'rotate'});// rot is defined by the angle BACvarp3=brd.create('point',[p2,rot],{fixed:true,size:1,name:'h1'});// h1: B rotated around A with angle rotvarline=brd.create('line',[p1,p3],{strokeOpacity:0.1});// line through A and h1varp4=brd.create('glider',[0,0.5,line],{fixed:true});// C is on the line with a fixed distance from Avarpoly=brd.create('polygon',[p1,p2,p4],{fillOpacity:0.05});