\documentclass[border=10pt]{standalone}\usepackage{lmodern}\usepackage{upgreek}\usepackage[inline]{asymptote}\begin{document}\begin{asy}[width=\the\linewidth,inline=true]settings.outformat="pdf";settings.render=0;settings.prc=false;import three;import graph3;import grid3;currentprojection=obliqueX;//Draw Axespen thickblack = black+0.75;real axislength = 1.0;draw(L=Label("$x$", position=Relative(1.1), align=SW), O--axislength*X,thickblack, Arrow3);draw(L=Label("$y$", position=Relative(1.1), align=E), O--axislength*Y,thickblack, Arrow3);draw(L=Label("$z$", position=Relative(1.1), align=N), O--axislength*Z,thickblack, Arrow3);//Set parameters of start corner of polar volume elementreal r = 1;real q=0.25pi; //thetareal f=0.3pi; //phireal dq=0.15; //dthetareal df=0.15; //dphireal dr=0.15;triple A = r*expi(q,f);triple Ar = (r+dr)*expi(q,f);triple Aq = r*expi(q+dq,f);triple Arq = (r+dr)*expi(q+dq,f);triple Af = r*expi(q,f+df);triple Arf = (r+dr)*expi(q,f+df);triple Aqf = r*expi(q+dq,f+df);triple Arqf = (r+dr)*expi(q+dq,f+df);pen thingray = gray+0.33;
Source: TeX.SE
Author: Chris Chudzicki
(License)