make a new render for blender

I want to change the behaviour of the default rendering in the blender.

I will analysis the mesh and then calculate the correct color for one pixel. (e.g. I will paint it red when it’s a sharp vertex in the mesh, or green if the vertex is in a flat plane)

Is there any way to achieve this?

thanks!