mariuszhermansdorfer / SandWorm

Augmented Reality Sandbox for Grasshopper & Rhino
MIT License
20 stars 11 forks source link

Feature/#47 aspect #56

Closed philipbelesky closed 4 years ago

philipbelesky commented 4 years ago

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.

Annotation 2019-10-17 201600

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.