(function(){ var svg=document.getElementById('demo-house'); if(!svg) return; var NS='http://www.w3.org/2000/svg', dots=[]; // roofline: left eave -> peak -> right eave, plus a second gable and porch eave var segs=[[40,170,200,70],[200,70,360,170],[360,170,460,170],[460,170,540,110],[540,110,620,170]]; segs.forEach(function(s){var n=Math.round(Math.hypot(s[2]-s[0],s[3]-s[1])/14); for(var i=0;i