more experiments in progress

This commit is contained in:
tTh
2023-04-29 19:29:45 +02:00
parent ff916c434c
commit cb599a253c
6 changed files with 201 additions and 4 deletions

View File

@@ -129,16 +129,31 @@ float vals[3];
fprintf(stderr, ">>> %s ( %p %d )\n", __func__, pimg, notused);
#endif
#define STP 16 /* stepd for x & y axex */
/* XXX CRITICAL BUG XXX
*
* what to do if STP is not a modulo of
* the width (or size) of the picture ?
* why if img height is 600 and stp was 16 ?
tth@redlady:~/Devel/FloatImg/Fonderie$ bc -l
600/16
37.50000000000000000000
*
* And this mistake is all around the code /o\
*
*/
#define STP 8 /* stepd for x & y axex */
coo[2] = coo[3] = STP;
for (y=0; y<pimg->height; y+=STP) {
for (y=0; y < pimg->height; y+=STP) {
coo[1] = y;
for (x=0; x<pimg->width; x+=STP) {
for (x=0; x < pimg->width; x+=STP) {
coo[0] = x;
foo = stat_zone(pimg, coo, vals);
if (foo) abort();
/* next step : plot the datas */
// XXX fprintf(stderr, "%s %6d %6d\n", __func__, x, y);
pixel_trinitron(pimg, coo, vals);
}
}