From 7c1ad9633a10ab7d17f309353bdc6bf56da11ef1 Mon Sep 17 00:00:00 2001 From: le vieux Date: Mon, 16 Nov 2020 11:12:29 +0100 Subject: [PATCH] not ready for prime time --- Fonderie/crapulator.c | 3 ++- Fonderie/interpolator.c | 15 ++++++++++----- Fonderie/t.c | 15 +++++++++------ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Fonderie/crapulator.c b/Fonderie/crapulator.c index 0dfd4a46..931aaaa9 100644 --- a/Fonderie/crapulator.c +++ b/Fonderie/crapulator.c @@ -9,6 +9,7 @@ #include "fonctions.h" #include "crapulator.h" +#include "glitches.h" /* -------------------------------------------------------------- */ static int effect_3(FloatImg *image) @@ -118,7 +119,7 @@ switch (idFx) { break; /* --- WTF -- */ case 25: - retval = vertical_singlitch(image, 250, fval, 18, 0); + retval = vertical_singlitch(image, 250+rand()%15 , fval, 18, 0); break; default : fprintf(stderr, "%s : effect #%d invalid\n", diff --git a/Fonderie/interpolator.c b/Fonderie/interpolator.c index 273e1206..427313ed 100644 --- a/Fonderie/interpolator.c +++ b/Fonderie/interpolator.c @@ -16,6 +16,7 @@ #include "../floatimg.h" +#include "fonctions.h" #include "glitches.h" #include "crapulator.h" #include "metriques.h" @@ -83,10 +84,12 @@ if (method) { qsort(idxvalues, nombre, sizeof(IdxValue), cmp_idxvalues); } -for (idx=0; idx %d, %ld files found\n", pattern, foo, globbuf.gl_pathc); - if (0 == globbuf.gl_pathc) { fprintf(stderr, "%s : no file found, aborting\n", __func__); return -1; @@ -135,8 +137,11 @@ w = iarray[0], h = iarray[1]; fprintf(stderr, "first image size : %dx%d\n", w, h); fimg_create(&A, w, h, 3); pFirst = &A; +// brotche_rand48_a(&A, 0.10, 250.555); fimg_create(&B, w, h, 3); pSecond = &B; +// brotche_rand48_a(&B, 0.10, 250.555); fimg_create(&Out, w, h, 3); +// brotche_rand48_a(&Out, 0.10, 250.555); ipng = 0; for (idx=0; idx #include +#include #include "../floatimg.h" #include "glitches.h" @@ -13,8 +14,8 @@ int verbosity; #define PNG "out.png" -#define W 512 -#define H 256 +#define W 800 +#define H 600 #define LMAX 233.333 #define TIMER 1 @@ -34,15 +35,17 @@ if (foo) { fprintf(stderr, "err %d create image\n", foo); exit(1); } -fimg_vdeg_a(&image, LMAX); +srand(getpid()); debut = fimg_timer_set(TIMER); -for (iter=0; iter<64; iter++) { +for (iter=0; iter<72; iter++) { - for (bloub=0; bloub<5; bloub++) { + fimg_vdeg_a(&image, LMAX); + + for (bloub=0; bloub<7; bloub++) { xloc = rand() % W; - omega = (float)(0.1 + drand48()*0.8) * 0.5; + omega = (float)(0.1 + drand48()*0.6) * 0.4; foo = vertical_singlitch(&image, xloc, LMAX, omega, (float)iter); if (foo) abort();