r is the radius of the sphere. r sin(theta) is the radius of the upper horizontal circular cross-section. A circle arc length is angle_in_radians * r. To get lengths of sides of the patch, we find lengths of the corresponding arcs (one with radius r sin(theta) and angle dphi and another with radius r and angle dtheta).
w is the position vector of the patch.
dw is the unit solid angle.