jjguy/heatmap — pull request #20 by kwauchope (2014-05-03 18:50:44+00:00)
Title: Stop points bleeding into pixels outside of radius

Put in a test to break early from the density calculations when dist>radius. Stops the contribution of a point to pixels outside of it's radius, an extreme version of this is possibility of having very visible squares in the heatmap depending on radius and pixVal calculation constants.

After some quick profiling also reduced processing time by almost 20% which makes sense due to the main loop being reduced by a factor of pi/4 and if the branch predictor is getting it right more often than not. This is significant for large dot sizes and data sets.