the fair gds editor CircleArray
Please Sign in

circle array

Circle Array with different Parameters

The macro generates an array of circles. The diameter of the circle will grow in x-direction. With the y-direction the layer of the circle will change.

Download: circleArray.layout





   1 #!/usr/bin/layout
   2 #name=circle array
   3 #help=an array of circles with different parameter
   4 
   5 
   6 int main(){
   7   int nx=10;
   8   int ny=9;
   9   int sizeStart=1000;
  10   int sizeStep=50;
  11   int stepX=4000;
  12   int stepY=3900;
  13   int x,y;
  14   for(x=0;x<nx;x++){
  15    for(y=0;y<ny;y++){
  16      int radius=x*sizeStep+sizeStart;
  17      layout->drawing->activeLayer=y;
  18      layout->drawing->p(x*stepX,y*stepY);
  19      layout->drawing->p(x*stepX,y*stepY+radius);
  20      layout->drawing->circle();
  21      }
  22   }
  23   layout->drawing->scaleFull();
  24 }

See also


CategoryMacro


CircleArray (last edited 2012-04-10 14:53:29 by dslb-088-065-043-205)