1 #include <qpms/lattices.h>
5 void dump_points2d_rordered(const points2d_rordered_t
*ps
, char *filename
) {
6 FILE *f
= fopen(filename
, "w");
7 for (size_t i
= 0; i
< ps
->nrs
; ++i
) {
8 fprintf(f
, "# r = %.16g\n", ps
->rs
[i
]);
9 for (ptrdiff_t j
= ps
->r_offsets
[i
]; j
< ps
->r_offsets
[i
+1]; ++j
)
10 fprintf(f
, "%.16g %.16g\n", ps
->base
[j
].x
, ps
->base
[j
].y
);
16 triangular_lattice_gen_t
*g
= triangular_lattice_gen_init(1, TRIANGULAR_HORIZONTAL
, false,0);
17 triangular_lattice_gen_extend_to_steps(g
, 1000);
18 for(size_t i
= 0; i
< g
->ps
.nrs
; ++i
) {
19 printf("%zd %.16g %td\n", i
, g
->ps
.rs
[i
], g
->ps
.r_offsets
[i
+1]);
21 triangular_lattice_gen_free(g
);