WIP: vers la compréhension du lien entre coordonnées spatiales et adresse mémoire (suite...) (et OK ici)

This commit is contained in:
Jean Sirmai 2023-08-21 22:26:26 +02:00
parent 0e84388b80
commit 815362698d
Signed by: jean
GPG Key ID: FB3115C340E057E3
3 changed files with 12 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -390,18 +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 */
// coeff = step_z * space_Z + step_y * space_Y + step_x * space_X
// 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;
int s = space_X * space_Y * space_Z / 2;
int z = space_Z / 2;
int y = z * space_Y;
int x = y * space_X;
draw_a_central_star (lines_origin, coeff + (s + x) * 6 + 1); // W
draw_a_central_star (lines_origin, coeff + (s - x) * 6 + 1); // E
draw_a_central_star (lines_origin, coeff + (s + y) * 6 + 1); // Z
draw_a_central_star (lines_origin, coeff + (s - y) * 6 + 1); // A
draw_a_central_star (lines_origin, coeff + (s + z) * 6 + 1); // S
draw_a_central_star (lines_origin, coeff + (s - z) * 6 + 1); // N
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
}
static int draw_a_central_central_star(GLuint *lines_origin, int coeff, int volume)
@ -666,3 +668,4 @@ bool compute_space(int space_X, int space_Y, int space_Z,
/* draw_line (lines_origin, s + 3, s + 10 + site % 2); */
/* } */

View File

@ -551,8 +551,8 @@ GLuint arrows[] = {
static void get_model_data_and_user_preferences(){
space_X = 9; // 0 < space_X assert TODO
space_Y = 9; // 0 < space_Y assert TODO
space_Z = 9; // 0 < space_Z assert TODO
space_Y = 7; // 0 < space_Y assert TODO
space_Z = 11; // 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)