# How to mesh annulus?

Hi,

I tried to mesh annulus with different number of nodes on the inner radius:

``````real r1 = 1.0;
real r2 = 1.3;
border outter(t = 0, pi / 2.){x = r2 * cos(t); y = r2 * sin(t); label=1;}
border inner(t = 0, pi / 2.){x = r1 * cos(t); y = r1 * sin(t); label=2;}
border left(t = 0, 1){x = 0; y = r1 + (r2 - r1) * t; label=3;}
border bottom(t = 0, 1){x = r1 + (r2 - r1) * t; y = 0; label=4;}
mesh Th = buildmesh(left(30) + outter(50) + bottom(30) + inner(30));
if (makePlot) {
plot(Th, wait=1, cmm="Initial mesh");
}
``````

But this does not work for some reason.

The expected result is something like this:

Sorry, I cannot write full functional example. but I hope this will help

// TT : the mesh
// Aangle : angular sector (in units of pi)
// npts : the nb of points on the perimeter
// labs : array of labels of segments of the boundary
// labs[0] : outter disk border
// labs[1] : inner disk border
// labs[2] : axis 1
// labs[3] : axis 2
int CptsIn= int(npts*LCin/(LCin+LCout+2*LZ)); // pts on the circle-axis sides
int CptsOut= int(npts*LCout/(LCin+LCout+2*LZ)); // pts on the circle-axis sides
int Zpts= int(npts*LZ/(LCin+LCout+2*LZ)); // pts on the z-axis sides
border circleOut (t=0.0,Aangle*pi){
label = labs[0];}
border circleIn (t=Aangle*pi,0){
label = labs[1];}
``````mesh Th = buildmesh(left(-30) + outter(50) + bottom(30) + inner(-30)); // notice the - signs