dg.js line intersection example - Djordje Rakonjac / december, 2015
Example of line intersection & it's dependencies.
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([5,2]).label("B");
l0 = dg.Line(p1, p2);
var p3 = dg.Point([7,7]).label("C");
var p4 = dg.Point([1,-2]).label("D");
var l1 = dg.Line(p3, p4);
var intersection = dg.Intersect(l0, l1);
var pl = dg.PerpendicularLine(intersection, l0);
var o = dg.Circle(intersection, p2);