[gegl] noise-solid: use a more appropriate drop off function



commit b86778a8de2ca299463a1182460a6c156b1337af
Author: Thomas Manni <thomas manni free fr>
Date:   Sat Nov 11 11:03:46 2017 +0100

    noise-solid: use a more appropriate drop off function
    
    Replace the original cubic function of ken perlin noise by a quintic
    function, which has zero first and second derivates at x=0 and x=1.
    The result is an attenuation of discontinuities in the vicinity of lattice
    edges.

 operations/common-gpl3+/noise-solid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/operations/common-gpl3+/noise-solid.c b/operations/common-gpl3+/noise-solid.c
index f7d8dbd..d40198f 100644
--- a/operations/common-gpl3+/noise-solid.c
+++ b/operations/common-gpl3+/noise-solid.c
@@ -86,7 +86,7 @@ property_int (height, _("Height"), 768)
 #include "gegl-op.h"
 
 #define TABLE_SIZE  64
-#define WEIGHT(T)   ((2.0 * fabs (T) - 3.0) * (T) * (T) + 1.0)
+#define WEIGHT(T)   ((-6.0*(T)*(T) +15.0*fabs(T)- 10.0) * fabs((T)*(T)*(T)) + 1.0)
 
 typedef struct
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]