Debian Codegraph @

docs/src/asymptote-source/square-lattice-configuration-2.asy

raw
1 //
2 // KIM-API: An API for interatomic models
3 // Copyright (c) 2013--2022, Regents of the University of Minnesota.
4 // All rights reserved.
5 //
6 // Contributors:
7 // Ryan S. Elliott
8 //
9 // SPDX-License-Identifier: LGPL-2.1-or-later
10 //
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation; either
14 // version 2.1 of the License, or (at your option) any later version.
15 //
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public License
22 // along with this library; if not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 //
25
26 //
27 // Release: This file is part of the kim-api.git repository.
28 //
29
30
31 //settings.outformat = "pdf";
32 size(20cm);
33
34 int maxrow = 5;
35 int maxcol = 10;
36
37 real circleSize = 0.075pt;
38 pen p = black+2;
39
40 for (int i=0; i < maxcol; ++i)
41 {
42 for (int j=0; j<maxrow; ++j)
43 {
44 if (i < maxcol/2)
45 {
46 filldraw(circle((i,j), circleSize), p);
47 if ((i < maxcol-1) && (j < maxrow-1))
48 filldraw(circle((i+0.5,j+0.5), circleSize), p);
49 }
50 else
51 {
52 draw(circle((i,j), circleSize), p);
53 if ((i < maxcol-1) && (j < maxrow-1))
54 draw(circle((i+0.5,j+0.5), circleSize), p);
55 }
56 }
57 }
58
59 draw(brace((0,maxrow), (maxcol-1,maxrow), amplitude=0.5),
60 L="$T_p$", N);
61 draw(brace((0,maxrow-0.75), (maxcol/2-0.5,maxrow-0.75), amplitude=0.5),
62 L="$A_p$", N);
63 draw(brace((maxcol/2,maxrow-0.75), (maxcol-1,maxrow-0.75), amplitude=0.5),
64 L="$B_p$", N);