Show HN: 2D field of view demo
In case someone is interested in the design:<p><a href="https://bbcdn.githack.com/rmsundaram/tryouts/raw/e06259fffad9231172a65b66ed99406df4e051d1/CG/WebGL/FoV/design.html" rel="nofollow">https://bbcdn.githack.com/rmsundaram/tryouts/raw/e06259fffad...</a><p>Devising the algorithm took around a month; did it in my free time. The implementation took a week, in HTML5 Canvas/JavaScript. Doing a 360°, not-bound-by-distance FoV would have been simpler, but FoV limited by both angle and distance took time.<p>The idea is to find the field of view of an observer on a map with blocking buildings (polygons) and also to service a line of sight query, to know if a given point is visible to the observer.<p>The code contains enough comments including citations and references to articles and books. Here's the actual repo from where the above page is served:<p><a href="http://bitbucket.org/rmsundaram/tryouts/src/master/CG/WebGL/FoV" rel="nofollow">http://bitbucket.org/rmsundaram/tryouts/src/master/CG/WebGL/...</a>