What 3d graphs? Which function f? As far as I can tell you're asking about convex sets not convex functions, so to see that a set is convex you pick any two points x,y in the set and check that the segment tx+(1-t)y is in the set for all 0<t<1. For the first one it's easier to do if you know that intersection of convex sets is convex.