working on glitches
This commit is contained in:
@@ -117,6 +117,7 @@ int vertical_singlitch(FloatImg *picz, int xpos, float fval,
|
||||
float omega, float phi)
|
||||
{
|
||||
int y, x, w, h;
|
||||
double dy;
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
fprintf(stderr, ">>> %s ( %p %d %f %f )\n", __func__, picz,
|
||||
@@ -124,9 +125,13 @@ fprintf(stderr, ">>> %s ( %p %d %f %f )\n", __func__, picz,
|
||||
#endif
|
||||
|
||||
h = picz->height; w = picz->width;
|
||||
#define BB 12
|
||||
#define BB 10
|
||||
for (y=BB; y<h-BB; y++) {
|
||||
x = xpos; /* add sinus deviation here */
|
||||
|
||||
dy = (double)y * omega;
|
||||
|
||||
x = xpos + (int)(10.9*sin(dy+phi)); /* add sinus deviation */
|
||||
|
||||
/* compute bounding box */
|
||||
if ( (x>BB) && (x<w-BB) ) {
|
||||
/* an make the glitch */
|
||||
|
||||
Reference in New Issue
Block a user