WIP: coord centre dans un cube 5x5x5
This commit is contained in:
parent
bdbbdc5915
commit
0b1fed686e
|
@ -430,7 +430,7 @@ static int draw_central_stars_in_neighbooring_cubes(GLuint *lines_origin,
|
||||||
int space_X, int space_Y, int space_Z, int step_x, int step_y)
|
int space_X, int space_Y, int space_Z, int step_x, int step_y)
|
||||||
{
|
{
|
||||||
float r = 0.0f, limit = 1.0f;
|
float r = 0.0f, limit = 1.0f;
|
||||||
int nb_in_neighborhood = 0;
|
int nb_in_neighborhood = 0, step_z = 1;
|
||||||
int s = space_X * space_Y * space_Z / 2;
|
int s = space_X * space_Y * space_Z / 2;
|
||||||
|
|
||||||
printf("buffers : with limit = %3.1f space units, neighborhood size = %d/%d ",\
|
printf("buffers : with limit = %3.1f space units, neighborhood size = %d/%d ",\
|
||||||
|
@ -447,7 +447,11 @@ static int draw_central_stars_in_neighbooring_cubes(GLuint *lines_origin,
|
||||||
r = radius(i, j, k, space_X, space_Y, space_Z);
|
r = radius(i, j, k, space_X, space_Y, space_Z);
|
||||||
if (r < limit){ // 2.5f
|
if (r < limit){ // 2.5f
|
||||||
if (D) printf("%6.3f (%d,%d,%d) ", r, i, j, k);
|
if (D) printf("%6.3f (%d,%d,%d) ", r, i, j, k);
|
||||||
return draw_a_central_star(lines_origin, s + (i * 64 + (j + 1) * 8 + (k + 1)) * 6 - 1);
|
return draw_a_central_star(lines_origin,
|
||||||
|
s + ((i + 0) * step_x
|
||||||
|
+ (j + 0) * step_y
|
||||||
|
+ (k + 0) * step_z) * 6
|
||||||
|
+ 10 );
|
||||||
/* printf("buffers : (444) n = %d i * step_x + j * step_y + k = %d 125 / 2 = %d\n",\
|
/* printf("buffers : (444) n = %d i * step_x + j * step_y + k = %d 125 / 2 = %d\n",\
|
||||||
s + (i * step_x + j * step_y + k) * 6 + 10, i * step_x + j * step_y + k, 125/2);
|
s + (i * step_x + j * step_y + k) * 6 + 10, i * step_x + j * step_y + k, 125/2);
|
||||||
*/
|
*/
|
||||||
|
@ -497,7 +501,7 @@ bool compute_space(int space_X, int space_Y, int space_Z,
|
||||||
int ad_hoc = 0;
|
int ad_hoc = 0;
|
||||||
if (CUBE) side_size = space_X; /* IF IT IS A CUBE, space_x = space_y = space_z */
|
if (CUBE) side_size = space_X; /* IF IT IS A CUBE, space_x = space_y = space_z */
|
||||||
if (1) ad_hoc = draw_central_stars_in_neighbooring_cubes(lines_origin, space_X, space_Y, space_Z, step_x, step_y);
|
if (1) ad_hoc = draw_central_stars_in_neighbooring_cubes(lines_origin, space_X, space_Y, space_Z, step_x, step_y);
|
||||||
if (CUBE) draw_a_central_central_star (lines_origin, s, side_size);
|
if (0 && CUBE) draw_a_central_central_star (lines_origin, s, side_size);
|
||||||
if (0 && CUBE) draw_EW_ZA_SN_in_a_cubic_space (lines_origin, s, side_size);
|
if (0 && CUBE) draw_EW_ZA_SN_in_a_cubic_space (lines_origin, s, side_size);
|
||||||
if (0 && CUBE) draw_3_x_4_around_6_poles (lines_origin, s, side_size);
|
if (0 && CUBE) draw_3_x_4_around_6_poles (lines_origin, s, side_size);
|
||||||
printf("DELTA = %d - %d = %d\nspace (%d x %d x %d) steps [ %d | %d | %d ]",\
|
printf("DELTA = %d - %d = %d\nspace (%d x %d x %d) steps [ %d | %d | %d ]",\
|
||||||
|
|
|
@ -550,9 +550,9 @@ GLuint arrows[] = {
|
||||||
|
|
||||||
static void get_model_data_and_user_preferences(){
|
static void get_model_data_and_user_preferences(){
|
||||||
|
|
||||||
space_X = 7; // 0 < space_X assert TODO
|
space_X = 5; // 0 < space_X assert TODO
|
||||||
space_Y = 7; // 0 < space_Y assert TODO
|
space_Y = 5; // 0 < space_Y assert TODO
|
||||||
space_Z = 7; // 0 < space_Z assert TODO
|
space_Z = 5; // 0 < space_Z assert TODO
|
||||||
cubes_nb = space_X * space_Y * space_Z;
|
cubes_nb = space_X * space_Y * space_Z;
|
||||||
pref_show_grid = 0; // 0, 1, 2, 3, 5, 6, 10, 15, 30, etc.
|
pref_show_grid = 0; // 0, 1, 2, 3, 5, 6, 10, 15, 30, etc.
|
||||||
// xyz, 0, x, y, z, xy, xz, yz, xyz (repeat)
|
// xyz, 0, x, y, z, xy, xz, yz, xyz (repeat)
|
||||||
|
|
Loading…
Reference in New Issue