dg.js circumcenter example - Djordje Rakonjac / december, 2015
Analyse when intersection point O goes "out" of triange? Try dragging.
var canvas = dg.Canvas("testcanvas", { border: "1px solid #ccc"});
var axes = dg.Axes([canvas.width() / 4, canvas.height() / 1.5]).hide(false);
var p1 = dg.Point([1, 1]).label("A");
var p2 = dg.Point([4, 5]).label("B");
var p3 = dg.Point([7,2]).label("C");
var c = dg.Segment(p1, p2);
var b = dg.Segment(p2, p3);
var a = dg.Segment(p3, p1);
var pa = dg.PerpendicularBisector(a);
var pb = dg.PerpendicularBisector(b);
var pc = dg.PerpendicularBisector(c);
var o = dg.Intersect(pa, pb).label("O").size(7).color("#ff0000").free(true);
var circle = dg.Circle(o, p1);