beta  = 1.0;
a     = 0.1;

ratio = 2.0;

rlo = 0.3;
rhi = 5.0;
nr  = 50;
dr  = (rhi - rlo) / nr;

thetalo = 0;
thetahi = pi;
ntheta  = 30;
dtheta  = (thetahi - thetalo) / ntheta;

[rs, thetas] = meshgrid(rlo:dr:rhi, thetalo:dtheta:thetahi);
[nr, ntheta] = size(rs);
Is = zeros(nr, ntheta);
for i = 1 : nr
	for j = 1 : ntheta
		r1    = rs(i, j);
		r2    = r1 * ratio;
		theta = thetas(i, j);
		I     = v2i(r1, r2, theta, beta, a);
		Is(i, j) = I;
	end
end

surf(rs, thetas/pi*180, Is);
shading interp;
