[gegl] stress/c2g: use golden angle instead of magic angle



commit eddd7db12794d66f1b251f85053014c45213a3f1
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Wed Jun 29 18:57:34 2011 +0100

    stress/c2g: use golden angle instead of magic angle

 operations/common/envelopes.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/operations/common/envelopes.h b/operations/common/envelopes.h
index ecbb415..40e3b4a 100644
--- a/operations/common/envelopes.h
+++ b/operations/common/envelopes.h
@@ -28,7 +28,7 @@ static void compute_luts(gdouble rgamma)
 {
   gint i;
   GRand *rand;
-  gfloat magic_angle = atan(sqrt(2.0)); /* http://en.wikipedia.org/wiki/Magic_angle */
+  gfloat golden_angle = G_PI * (3-sqrt(5.0)); /* http://en.wikipedia.org/wiki/Golden_angle */
   gfloat angle = 0.0;
 
   if (luts_computed==rgamma)
@@ -38,7 +38,7 @@ static void compute_luts(gdouble rgamma)
 
   for (i=0;i<ANGLE_PRIME;i++)
     {
-      angle += magic_angle;
+      angle += golden_angle;
       lut_cos[i] = cos(angle);
       lut_sin[i] = sin(angle);
     }



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