From: Ryzen Cabrera on
Hi!

I'm having a little problem plotting a function whose problem domain D is circular, i.e. D = D(r,theta) = [(0<r<R), (0<theta<2*pi)]; where R is the max radius of the circle. The problem goes like this: suppose a function z = z(r), for any value of 'r', a corresponding value of 'z' can be obtained. Now plotting this 'z' vs. 'r' is quite easy; however, plotting 'z' for the entire domain D is quite problematic for me. Matlab shows examples of 3D plots but I haven't encountered yet this kind problem.

The idea is that for any value of theta (0<theta<2*pi), the same value of 'z' for a value of 'r' should be obtained. For instance, the value of 'z' at (theta = pi/2, r = 0.5R) is the same as at (theta = pi, r = 0.5R), and so on. In other words, the 3D plot would look like concentric circles of varying height in the z-direction.

Put simply, suppose the function is z = z(r) = (1+g*r)*r, where 'g' is a constant; how do I plot this in D = D(r,theta) for [(0<r<R),(0<theta<2*pi)]?