rendering the overlapped geometry of objects

Hello Everyone,
I have a requirement to render the result of two objects added together. For instance, if two spheres touch each other I want to only see the object formed by the intersection of the two spheres. I think some people call this “Mutual Exclusive” volume. Other objects include cones and cubes. I also need to view sphere #1 with the sphere #2 cut out of it. The origin of all of these are arbitrary.

Do any of you know how to render these objects?

Also, I tried to copy and paste some C code into a message and I got an error stating that the