I am trying to set up a Cycles texture to render figures for a math textbook. I am new to blender and am having trouble. I am looking for an effect similar to
or
Ideally the front and back surfaces would be rendered in different colors and a surface would be transparent enough to see another surface behind it, but its back faces would not show up in the transparent parts.