var board = JXG.JSXGraph.initBoard('box1', {
axis: true, boundingbox: [-1.8, 1.8, 1.8, -1.8], showcopyright: false,keepaspectratio: true, axis: false, zoom: false,showNavigation: false
});
var p1 = board.create('point', [-1.6, 1.5],{name:'A', size: 1,face:"", color:'blue', label: {offset:[10,-5], color:'blue'}} );
var p2 = board.create('point', [-1.6, -0.8],{name:'B', size: 1,face:"", color:'blue', label: {offset:[-15,10], color:'blue'}} );
var p3 = board.create('point', [-0.4, -0.8],{name:'C', size: 1,face:"", color:'blue', label: {offset:[3,10], color:'blue'}} );
var l1 = board.create('segment', [p1, p2]);
var l2 = board.create('segment', [p2, p3]);
var l3 = board.create('segment', [p1, p3]);
var pp1 = board.create('perpendicularpoint', [p2, l3],{ size: 1, face:"", color:'blue', label: {offset:[5,5], color:'blue'
}} );
var l3 = board.create('segment', [p2, pp1]);
var l4 = board.create('segment', [p3, pp1], {name: '2', withLabel: true, label: {offset:[8, 8],color:'blue'}});
var l4 = board.create('segment', [p1, pp1], {name: '8', withLabel: true, label: {offset:[6, 8],color:'blue'}});