From dd2c47db3512658858685c83dd772603203aaab1 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Sun, 22 Jul 2018 01:20:29 -0400 Subject: potts now fully functional --- src/wolff_On.cpp | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'src/wolff_On.cpp') diff --git a/src/wolff_On.cpp b/src/wolff_On.cpp index 32a6fc4..a59876f 100644 --- a/src/wolff_On.cpp +++ b/src/wolff_On.cpp @@ -1,5 +1,6 @@ #include + #ifdef HAVE_GLUT #include #endif @@ -7,6 +8,7 @@ #include #include #include +#include typedef orthogonal_t orthogonal_R_t; typedef vector_t vector_R_t; @@ -32,36 +34,6 @@ double H_modulated(vector_R_t v, int order, double mag) { return mag * cos(order * theta(v)); } -double hue_to_R(double theta) { - if (((M_PI / 3 <= theta) && (theta < 2 * M_PI / 3)) || ((4 * M_PI / 3 <= theta) && (theta < 5 * M_PI / 3))) { - return 1.0 - fabs(fmod(theta / (2 * M_PI / 6), 2) - 1.0); - } else if (((0 <= theta) && (theta < M_PI / 3)) || ((5 * M_PI / 3 <= theta) && (theta <= 2 * M_PI))) { - return 1.0; - } else { - return 0.0; - } -} - -double hue_to_G(double theta) { - if (((0 <= theta) && (theta < M_PI / 3)) || ((M_PI <= theta) && (theta < 4 * M_PI / 3))) { - return 1.0 - fabs(fmod(theta / (2 * M_PI / 6), 2) - 1.0); - } else if (((M_PI / 3 <= theta) && (theta < 2 * M_PI / 3)) || ((2 * M_PI / 3 <= theta) && (theta < M_PI))) { - return 1.0; - } else { - return 0.0; - } -} - -double hue_to_B(double theta) { - if (((2 * M_PI / 3 <= theta) && (theta < M_PI)) || ((5 * M_PI / 3 <= theta) && (theta <= 2 * M_PI))) { - return 1.0 - fabs(fmod(theta / (2 * M_PI / 6), 2) - 1.0); - } else if (((M_PI <= theta) && (theta < 4 * M_PI / 3)) || ((4 * M_PI / 3 <= theta) && (theta < 5 * M_PI / 3))) { - return 1.0; - } else { - return 0.0; - } -} - int main(int argc, char *argv[]) { count_t N = (count_t)1e7; @@ -81,7 +53,6 @@ int main(int argc, char *argv[]) { int order = 2; int opt; - q_t J_ind = 0; q_t H_ind = 0; double epsilon = 1; -- cgit v1.2.3-70-g09d2