Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha blend coincident data points #32

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Commits on Aug 28, 2015

  1. Alpha blend coincident data points

    The grid mechanism basically combines data points that are closer than `cellSize` into a single data point. It was doing this by adding together the altitudes. If the grid is intended to be a higher-performance approximation of sending all of the individual data points to simpleheat, then this isn't the correct way to combine altitudes. In simpleheat, two points drawn on top of each other with altitude of `max * 0.5` would not look like a single point of altitude `max`, but rather `max * 0.75`, because they are combined using alpha blending. (The blurred part of the circle will always look a bit different--I don't know how you can fix that with the grid approach.)
    
    By using alpha blending, we can get rid of the `v` parameter, which (correct me if I'm wrong) was an attempt to prevent clustered points from always adding up to max intensity. Alpha blending solves this problem more directly.
    
    Getting rid of the `v` parameter means that adding a single point of altitude = `max` will appear with the maximum intensity of color, which is what you get with simpleheat and what users would expect. It also means that two max altitude points on top of each other will look the same (at least in the center) as one max altitude point, which is again a more correct/expected result.
    jcheng5 committed Aug 28, 2015
    Configuration menu
    Copy the full SHA
    afdc8f4 View commit details
    Browse the repository at this point in the history