Here is Canvas object wihch demonstrate the problem.

Show the normal and shear stresses on a stress element representing the state of stress at D.