Ok, this all should be good to review. I normally dislike using a full hue spectrum for aspect, so have gone with a pink vs blue and light vs dark. It's not great, but I've run out of ideas for now.
The procedure used to process the pixels follows the same structure set out in Slope.cs. The aspect value is determined by measuring the difference between the y axis and a per-pixel vector. That vector's X and Y values derive from the differences in elevation across each of those axes. I.E. if the East pixel is at z = 10 and the West pixel is at z = 30 that X value is 20. In the case of the diagonal axes the values get halved and added to both X and Y.
The above method was developed partly as an effort to avoid assembling and averaging a bunch of normals for each face given the grid spacing is regular. No idea if this is the usual approach, but it seems to work.
Ok, this all should be good to review. I normally dislike using a full hue spectrum for aspect, so have gone with a pink vs blue and light vs dark. It's not great, but I've run out of ideas for now.
The procedure used to process the pixels follows the same structure set out in
Slope.cs
. The aspect value is determined by measuring the difference between the y axis and a per-pixel vector. That vector'sX
andY
values derive from the differences in elevation across each of those axes. I.E. if the East pixel is at z = 10 and the West pixel is at z = 30 that X value is 20. In the case of the diagonal axes the values get halved and added to both X and Y.The above method was developed partly as an effort to avoid assembling and averaging a bunch of normals for each face given the grid spacing is regular. No idea if this is the usual approach, but it seems to work.