dg.js regular polygon drawing example - Djordje Rakonjac / december, 2015

Example of regular polygon drawing.

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([3, 1]);
		var p2 = dg.Point([5, 2]);
		var poly = dg.Polygon([p1, p2], 6);
		
					
copyright 2016, Djordje Rakonjac