| 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 |
int particleID = 0; |
| 41 |
|
| 42 |
for (int i=0; i < maxcol; ++i) |
| 43 |
{ |
| 44 |
for (int j=0; j<maxrow; ++j) |
| 45 |
{ |
| 46 |
filldraw(circle((i,j), circleSize), p); |
| 47 |
if ((i < maxcol-1) && (j < maxrow-1)) |
| 48 |
{ |
| 49 |
filldraw(circle((i+0.5,j+0.5), circleSize), p); |
| 50 |
} |
| 51 |
} |
| 52 |
} |
| 53 |
|
| 54 |
draw(brace((0,maxrow-0.75), (maxcol-1,maxrow-0.75), amplitude=0.5), |
| 55 |
L="$T_p$", N); |