Another try with MetaPost. I chose a longer way than Thruston's before by implementing the possibility of drawing a more general polar grid, with arbitrary polar and radial boundaries, as shown in the first figure. The second figure being the desired image with standard polar grid.
Transparency is supported by the MetaFun format of MetaPost, at the condition that the output is in PDF format. I've felt like making use of it in this program, which is thus to be compiled by this instruction in Unix systems:
mptopdf -metafun -latex polargrid.mp
or the like (which I don't know) for Windows system.
input mpcolornames; input latexmp;
setupLaTeXMP(mode = rerun, textextlabel = enable, packages = "amsmath");
u := 1cm; % unit length
% Circular arc
vardef arc(expr C, r, theta_min, theta_max) =
save n, theta, mystep;
mystep = 1.37; n = floor((theta_max - theta_min)/mystep); theta = theta_min;
(dir(theta)
for k=1 upto n:
hide(theta := theta + mystep;) .. dir(theta)
endfor .. dir(theta_max)) scaled r shifted C
enddef;
% General polar grid with arbitrary boundaries
% 0 <= rmin < rmax, nr integer >= 1
% 0 < theta_max - theta_min <= 360, ntheta integer >=1
% eps: radii's supplementary length
def polar_grid(expr rmin, rmax, nr)(expr theta_min, theta_max, ntheta)(expr eps) =
save r, rstep, theta, theta_step;
theta_step = (theta_max-theta_min)/ntheta; theta = theta_min;
for i = 0 upto
if theta_max - theta_min < 360: ntheta else: ntheta-1 fi:
draw ((rmin, 0) -- (rmax+eps, 0)) rotated theta;
theta := theta + theta_step;
endfor;
rstep = (rmax-rmin)/nr; r = rmin;
for j = 0 upto nr:
draw arc(origin, r, theta_min, theta_max);
r := r + rstep;
endfor;
enddef;
% Shortcut for circular labelling
def circlabel(expr mylabel, theta) = freelabel(mylabel, Rmax*dir(theta), origin) enddef;
% The polar function
vardef f(expr t) = (2-2sind(t))*dir(t) enddef;
% Polar grid example
beginfig(1);
polar_grid(2u, 4u, 4)(30, 290, 13)(0);
endfig;
%Cardioid figure upon a standard polar grid
beginfig(2);
% Complete polar grid
drawoptions(withcolor 0.8white);
rmax := 4u; eps := 6bp;
polar_grid(0, rmax, 8)(0, 360, 32)(eps);
drawoptions(withcolor 0.5white);
polar_grid(0, rmax, 4)(0, 360, 8)(eps);
% External circle
draw fullcircle scaled 2(rmax+0.3eps);
% Labels
drawoptions(withcolor black);
Rmax := rmax + eps;
circlabel("$\dfrac{\pi}{4}$", 45);
circlabel("$\dfrac{3\pi}{4}$", 135);
circlabel("$\dfrac{5\pi}{4}$", -135);
circlabel("$\dfrac{7\pi}{4}$", -45);
circlabel("$0$", 0);
circlabel("$\dfrac{\pi}{2}$", 90);
circlabel("$\pi$", 180);
circlabel("$\dfrac{3\pi}{2}$", -90);
% Cardioid definition
mystep := .5;
n := round(360/mystep);
path cardio; cardio = (for t = 0 upto n-1: f(t*mystep) .. endfor cycle) scaled u;
% Filling with transparent color and drawing
fill origin -- subpath ((90, -90)/mystep) of cardio -- cycle
withcolor transparent("normal", 0.3, DarkRed);
draw cardio withcolor red;
endfig;
end.


pgfplots
isn't that hard if you knowtikz
, not using it would be much harder than learning a new package I guess ;-)