dg.js line dependency example - Djordje Rakonjac / december, 2015

Try dragging point B and analyse line dependency.

dg.js example code

		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, 2]).label("B");
		
		var l = dg.Line(p1,p2);
		var m = dg.Midpoint(p1,p2).label("M").size(7);
		var pl = dg.PerpendicularLine(m, l).color("#fef222");
		var p3 = dg.Point([0, 3]);
		var prl = dg.ParallelLine(p3, pl);
		dg.PerpendicularLine(p3, prl);
					
					
copyright 2016, Djordje Rakonjac