<div id="triangle" class="jxgbox" style="width:400px; height:400px;"></div> <script type="text/javascript"> var board = JXG.JSXGraph.initBoard('triangle', { boundingtriangle: [-10,10, 10,-10], showCopyright:false}); var cerise = {strokeColor: '#901B77', fillColor: '#CA147A',face:'x'}, perp1 = {strokeColor: 'purple', dash:2, strokeWidth:1, point: JXG.deepCopy(cerise,{visible: true,withLabel: true})}, perp2 = {strokeColor: 'red', strokeWidth:1, point: JXG.deepCopy(cerise,{visible: true,withLabel: true})} var p1 = board.create('point',[-5,-4],{name:'A',size:4}), p2 = board.create('point',[-1.5,3],{name:'B',size:4}), p3 = board.create('point',[3,2],{name:'C',size:4}), triangle = board.create('polygon',[p1,p2,p3]); board.create('circle',[p1,p2,p3]); pcirc = board.create('circumcenter',[p1,p2,p3], {name:'O', color:'green'}); pc = board.create('midpoint',[p1,p2],cerise); pb = board.create('midpoint',[p1,p3],cerise); pa = board.create('midpoint',[p2,p3],cerise); la = board.create('segment',[p1,pa],{dash:1}); lb = board.create('segment',[p2,pb],{dash:1}); lc = board.create('segment',[p3,pc],{dash:1}); G = board.create('intersection',[la,lb], { color:'green'}); pABC = board.create('perpendicular', [triangle.borders[0], pc], perp1); pBCA = board.create('perpendicular', [triangle.borders[1], pa], perp1); pCAB = board.create('perpendicular', [triangle.borders[2], pb], perp1); pA = board.create('perpendicular', [triangle.borders[0], p3], perp2); pB = board.create('perpendicular', [triangle.borders[1], p1], perp2); pC = board.create('perpendicular', [triangle.borders[2], p2], perp2); H = board.create('intersection',[pA,pB], { color:'green'}); </script>
|