Angle of reflection on 3d Object

375 Views Asked by At

I am rasterizing some 3d objects (x,y,z) onto a 2d plane (x,y) and I want to color the rasterized cells based on the angle of reflection of an angle of incidence that comes from directly above the centroid (as seen in diagram).

How do I calculate the angle of reflection on the X,Y plane given a 3d line of incidence and a 3d polygon?

[rasterization of angle of reflection1