\documentclass[border=10pt]{standalone} \usepackage{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] settings.outformat="pdf"; settings.render=0; settings.prc=false; size(7cm); import fontsize; defaultpen(fontsize(9pt)); real wd=0.6bp; pen dotPen=deepblue+wd; pen dotFill=dotPen; pen dotPenB=blue+wd; pen dotPenC=red+wd; pen linePen=deepblue+wd; pen fillPen=lightgreen+opacity(0.5); pen thinLinePen=black+wd/2; guide[] g; g=texpath("$\Omega$"); filldraw(g,fillPen,linePen); pair a,b,c,d; pair labdir; int pointNo=0; for(int i=0;i<g.length;++i){ for(int j=0;j<size(g[i])-1;++j){ a=point(g[i],j); d=point(g[i],j+1); if(straight(g[i],j)){ draw(a--d,thinLinePen); }else{ b=postcontrol(g[i],j); c=precontrol(g[i],j+1); draw(a--b--c--d,thinLinePen); dot(b,dotPenB,UnFill); dot(c,dotPenC,UnFill); } dot(a,dotPen,Fill(dotFill)); labdir=rotate(-90)*dir(g[i],j); label("$\scriptsize "+string(pointNo)+"$",a,labdir); ++pointNo; } dot(d,dotPen,Fill(dotFill)); labdir=rotate(-90)*dir(g[i],size(g[i])-1); label("$\scriptsize "+string(pointNo)+"$",d,labdir); } \end{asy} \end{document}
Source: TeX.SE