WIP: 1 x 1 x 1 OK avec adresse = coeff + cubes_nb * 3 - 2
This commit is contained in:
parent
1879b3f281
commit
ce01d7622a
Binary file not shown.
After Width: | Height: | Size: 178 KiB |
Binary file not shown.
After Width: | Height: | Size: 230 KiB |
|
@ -431,11 +431,12 @@ static float radius(int x, int y, int z, int space_X, int space_Y, int space_Z){
|
|||
static void experimental_1(GLuint *lines_origin, int space_X, int space_Y, int space_Z, int a, int b)
|
||||
{
|
||||
float rayon = 0.0f, limit_sup = 1.4f, limit_inf = 0.0f;
|
||||
int center = space_X * space_Y * space_Z / 2;
|
||||
int cubes_nb = space_X * space_Y * space_Z, center = cubes_nb / 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;
|
||||
int u = 0, v = 0, delta = - 400; // - space_Y * space_Z * 4 - 5;
|
||||
|
||||
int u = 0, v = 0, delta = 3 + 2;
|
||||
if (1) printf("space_XYZ (%d*%d*%d) step_xyz (%d,%d,%d) coeff = %d = step_z * space_Z + step_y * space_Y + step_x * space_X\n",\
|
||||
space_X, space_Y, space_Z, step_x, step_y, step_z, coeff);
|
||||
|
||||
for (int i = 0; i < space_X; i++)
|
||||
for (int j = 0; j < space_Y; j++)
|
||||
|
@ -448,16 +449,12 @@ v = i * step_x + j * step_y + k * step_z;
|
|||
|
||||
if (1) printf("i,j,k =%2d,%2d,%2d v = %d u = %d\n", space_X / 2 - i, space_Y / 2 - j, space_Z / 2 - k, v, u);
|
||||
|
||||
draw_a_central_star(lines_origin, // + cubes_nb * 6 / 2 - 2
|
||||
coeff
|
||||
+ center
|
||||
+ v * 6
|
||||
+ delta);
|
||||
|
||||
if (1) draw_a_central_star(lines_origin, coeff + center + v * 6 + delta);
|
||||
if (0) draw_a_central_star(lines_origin, coeff + cubes_nb * 6 / 2 + 2);
|
||||
}
|
||||
}
|
||||
if (1) printf("\n%d*%d*%d = %d (b-a)/18 = %d r=%4.2f coeff = %d center = %d delta = %d\n",\
|
||||
space_X, space_Y, space_Z, center * 2, (b-a)/18, rayon, coeff, center, delta);
|
||||
if (1) printf("\n%d*%d*%d = cubes_nb = %d (buffer_vertex_size_after_stars - after_grids)/18 = %d rayon=%4.2f coeff = %d center = %d delta = %d\n",\
|
||||
space_X, space_Y, space_Z, cubes_nb, (b-a)/18, rayon, coeff, center, delta);
|
||||
|
||||
}
|
||||
|
||||
|
@ -504,8 +501,8 @@ bool compute_space(int space_X, int space_Y, int space_Z,
|
|||
int side_size = space_X, ad_hoc = 0, u = cubes_nb / 2 * 6;
|
||||
|
||||
|
||||
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)
|
||||
if (0 && pref_central_stars_nb == 1) draw_a_central_star (lines_origin, coeff + cubes_nb * 3 - 2);
|
||||
if (0 && 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 (1) experimental_1(lines_origin, space_X, space_Y, space_Z, buffer_vertex_size_after_grids, buffer_vertex_size_after_stars);
|
||||
if (0) draw_a_central_central_star (lines_origin, coeff, cubes_nb * 6 / 2 - 2);
|
||||
|
|
|
@ -552,9 +552,9 @@ GLuint arrows[] = {
|
|||
|
||||
static void get_model_data_and_user_preferences(){
|
||||
|
||||
space_X = 11; // 0 < space_X assert TODO
|
||||
space_Y = 11; // 0 < space_Y assert TODO
|
||||
space_Z = 11; // 0 < space_Z assert TODO
|
||||
space_X = 1; // 0 < space_X assert TODO
|
||||
space_Y = 1; // 0 < space_Y assert TODO
|
||||
space_Z = 1; // 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)
|
||||
|
@ -567,6 +567,7 @@ static void get_model_data_and_user_preferences(){
|
|||
pref_central_stars_nb = cubes_nb; // cubes_nb = max = space_X * space_Y * space_Z
|
||||
pref_central_stars_nb = 1 + 6 + 24 + 6 + 6 + 24 + 70;
|
||||
pref_central_stars_nb = 1 + 6;
|
||||
pref_central_stars_nb = 1;
|
||||
|
||||
pref_test_diagonal = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue