diff --git a/Points cardinaux dans un parallelépipède rectangle .png b/Points cardinaux dans un parallelépipède rectangle .png deleted file mode 100644 index ad59f00..0000000 Binary files a/Points cardinaux dans un parallelépipède rectangle .png and /dev/null differ diff --git a/Quelle est la fonction f(x) ? b/Quelle est la fonction f(x) ? deleted file mode 100644 index 9ee88db..0000000 --- a/Quelle est la fonction f(x) ? +++ /dev/null @@ -1,15 +0,0 @@ - x (x+1)(x+1) (x+1) 1 f(x) g(x) - ----------------------------------------------------------- - 3 16 4 1 149 3 - 5 36 6 1 588 10 - 7 64 8 1 1538 53 - 9 100 10 1 3184 156 - 11 144 12 1 5375 343 - 13 196 14 1 9332 638 - 15 256 16 1 14218 1065 - 17 324 18 1 20568 1648 - 19 400 20 1 28574 2411 - 21 484 22 1 38428 3378 - - - Quelle est la fonction f(x) ? diff --git a/src/graphics/buffers.c b/src/graphics/buffers.c index 6c69091..111d63f 100644 --- a/src/graphics/buffers.c +++ b/src/graphics/buffers.c @@ -390,20 +390,20 @@ static void draw_EW_ZA_SN_in_a_cubic_space(GLuint *lines_origin, int coeff, int /* Z-A C +/- side_size x f */ /* E-W C +/- side_size x side_size x f */ + int step_z = 1, step_y = space_Z, step_x = space_Z * space_Y; + // coeff = step_z * space_Z + step_y * space_Y + step_x * space_X // for (int i = 0; i < space_X * space_Y * space_Z; i ++) draw_a_central_star (lines_origin, coeff + i * 6); - // space_X = 9; space_Y = 7; space_Z = 11; + // space_X = 9; space_Y = 9; space_Z = 9; int s = space_X * space_Y * space_Z / 2; - int z = space_Z / 2; - int y = z * space_Y; - int x = y * space_X; + // int z = space_Z / 2; int y = z * space_Y; int x = y * space_X; - draw_a_central_star (lines_origin, coeff + (s + x - 7) * 6 + 1); // W - draw_a_central_star (lines_origin, coeff + (s - x + 7) * 6 + 1); // E - draw_a_central_star (lines_origin, coeff + (s + y - 2) * 6 + 1); // Z - draw_a_central_star (lines_origin, coeff + (s - y + 2) * 6 + 1); // A - draw_a_central_star (lines_origin, coeff + (s + z + 0) * 6 + 1); // S - draw_a_central_star (lines_origin, coeff + (s - z - 0) * 6 + 1); // N + draw_a_central_star (lines_origin, coeff + (s + step_x) * 6 + 1); // W + draw_a_central_star (lines_origin, coeff + (s - step_x) * 6 + 1); // E + draw_a_central_star (lines_origin, coeff + (s + step_y) * 6 + 1); // Z + draw_a_central_star (lines_origin, coeff + (s - step_y) * 6 + 1); // A + draw_a_central_star (lines_origin, coeff + (s + step_z) * 6 + 1); // S + draw_a_central_star (lines_origin, coeff + (s - step_z) * 6 + 1); // N } static int draw_a_central_central_star(GLuint *lines_origin, int coeff, int volume) @@ -468,34 +468,28 @@ static float radius(int x, int y, int z, int space_X, int space_Y, int space_Z){ /* return 0; */ /* } */ -static int experimental_1(GLuint *lines_origin, - int space_X, int space_Y, int space_Z, int step_x, int step_y) +static int experimental_1(GLuint *lines_origin, int space_X, int space_Y, int space_Z) { - float r = 0.0f, limit = 1.0f; - int nb_in_neighborhood = 0, step_z = 1; - int coeff = space_X * space_Y * space_Z / 2; + float rayon = 0.0f, limit = 1.0f; + int nb_in_neighborhood = 0; + int center = space_X * space_Y * space_Z / 2; + int step_z = 1, step_y = space_Z, step_x = space_Z * space_Y; + int coeff = step_z * space_Z + step_y * space_Y + step_x * space_X; - printf("buffers : with limit = %3.1f, %d/%d neighboors, ",\ - limit, nb_in_neighborhood, coeff * 2 + 1); - -// int z = space_Z; -// int y = z * space_Z; -// int x = y * space_Y; - for (int i = 0; i < space_X; i++){ - for (int j = 0; j < space_Y; j++){ + for (int i = 0; i < space_X; i++) + for (int j = 0; j < space_Y; j++) for (int k = 0; k < space_Z; k++){ - r = radius(i, j, k, space_X, space_Y, space_Z); - if (r < limit){ // 2.5f - int u = i * step_x + j * step_y + k * step_z, delta = 3378; - printf ("i(%d)*step_x + j(%d)*step_y + k(%d)*step_z = %d * 6 = %d delta = %d n = %d max/2 = %d",\ - i, j, k, u, u * 6, delta, coeff + u * 6 + delta,\ - step_z * space_Z + step_y * space_Y + step_x * space_X); - return draw_a_central_star(lines_origin, coeff + u * 6 + delta ); + rayon = radius(i, j, k, space_X, space_Y, space_Z); + if (rayon < limit){ + int u = (i - space_X / 2) * step_x + (j - space_Y / 2) * step_y + (k - space_Z / 2) * step_z; + u = (i + 0) * step_x + (j + 0) * step_y + (k + 0) * step_z; + if (1) printf("%d*%d*%d rayon = %4.2f i,j,k = %2d,%2d,%2d \n",\ + space_X, space_Y, space_Z, rayon, space_X / 2 - i, space_Y / 2 - j, space_Z / 2 - k); + draw_a_central_star(lines_origin, coeff + center + u * 6 + 12); nb_in_neighborhood ++; } } - } - } + if (0) printf("buffers g: with limit = %3.1f, %d/%d neighboors, ", limit, nb_in_neighborhood, coeff * 2 + 1); return 0; } @@ -543,12 +537,12 @@ bool compute_space(int space_X, int space_Y, int space_Z, if (0 && pref_central_stars_nb == 1) draw_a_central_star (lines_origin, coeff + cubes_nb * 3 - 3); if (pref_central_stars_nb == cubes_nb) for (int i = 0; i < space_X * space_Y * space_Z; i ++) draw_a_central_star (lines_origin, coeff + i * 6); - if (0) ad_hoc = experimental_1(lines_origin, space_X, space_Y, space_Z, step_x, step_y); - if (1) draw_a_central_central_star (lines_origin, coeff, cubes_nb * 6 / 2 - 2); - if (1) draw_EW_ZA_SN_in_a_cubic_space (lines_origin, coeff, space_X, space_Y, space_Z); + if (1) ad_hoc = experimental_1(lines_origin, space_X, space_Y, space_Z); + if (0) draw_a_central_central_star (lines_origin, coeff, cubes_nb * 6 / 2 - 2); + if (0) draw_EW_ZA_SN_in_a_cubic_space (lines_origin, coeff, space_X, space_Y, space_Z); if (0) draw_3_x_4_around_6_poles (lines_origin, coeff, side_size); - printf(" DELTA = %d - %d = %d space (%d x %d x %d) steps [ %d | %d | %d ] ",\ + if (0) printf(" DELTA = %d - %d = %d space (%d x %d x %d) steps [ %d | %d | %d ] ",\ coeff + u, ad_hoc, coeff + u - ad_hoc, space_X, space_Y, space_Z, step_x, step_y, step_z); if (pref_test_diagonal) diagonal_test (space_X, space_Y, space_Z, step_x, step_y, step_z, lines_origin); if (0) calcul(lines_origin, side_size, coeff); diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index 32f427d..518c8b1 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -550,9 +550,9 @@ GLuint arrows[] = { static void get_model_data_and_user_preferences(){ - space_X = 9; // 0 < space_X assert TODO - space_Y = 7; // 0 < space_Y assert TODO - space_Z = 11; // 0 < space_Z assert TODO + space_X = 3; // 0 < space_X assert TODO + space_Y = 3; // 0 < space_Y assert TODO + space_Z = 3; // 0 < space_Z assert TODO cubes_nb = space_X * space_Y * space_Z; pref_show_grid = 1; // 0, 1, 2, 3, 5, 6, 10, 15, 30, etc. // xyz, 0, x, y, z, xy, xz, yz, xyz (repeat) diff --git a/symétrie____4cade635dd90d3af1c4b3bacaca404173948ce4b.png b/symétrie____4cade635dd90d3af1c4b3bacaca404173948ce4b.png deleted file mode 100644 index 8a1c747..0000000 Binary files a/symétrie____4cade635dd90d3af1c4b3bacaca404173948ce4b.png and /dev/null differ diff --git a/une ébauche.png b/une ébauche.png deleted file mode 100644 index 5f983e0..0000000 Binary files a/une ébauche.png and /dev/null differ