WIP: tatonnements... hésitations... doutes... questions... etc.

This commit is contained in:
Jean Sirmai 2023-07-08 09:35:30 +02:00
parent 03982e911c
commit 0da70e312c
Signed by: jean
GPG Key ID: FB3115C340E057E3
2 changed files with 15 additions and 15 deletions

View File

@ -279,12 +279,12 @@ static bool compute_space_3D (int space_size_x,
GLubyte *line_origin,
GLubyte *plan_origin)
{
printf("\n");
printf("vertex [x*y*z] > ");
float x = 0, y = 0, z = 0;
for (int i = 0; i < space_size_x; i++)
for (int j = 0; j < space_size_y; j++)
for (int k = 0; k < space_size_z; k++){
for (int i = 0; i <= space_size_x; i++)
for (int j = 0; j <= space_size_y; j++)
for (int k = 0; k <= space_size_z; k++){
printf("[%d*%d*%d] ", i, j, k);
@ -298,26 +298,26 @@ static bool compute_space_3D (int space_size_x,
vertex_ndx += 3; // if (V) printf(" => vertex_ndx = %3d space_3D\n", vertex_ndx);
*(color_origin + colors_ndx + 0) = 0.6f * x ;
*(color_origin + colors_ndx + 1) = 0.1f * y;
*(color_origin + colors_ndx + 2) = 0.1f * z;
*(color_origin + colors_ndx + 0) = 1.0f * x ;
*(color_origin + colors_ndx + 1) = 0.0f * y;
*(color_origin + colors_ndx + 2) = 0.0f * z;
colors_ndx += 3; // if (C) printf(" => colors_ndx = %d\n", colors_ndx);
};
printf("\n");
for (int i = 0; i < space_size_x; i++){
for (int i = 0; i <= space_size_x; i++){
*(line_origin + lines_ndx + 0) = i * 2 + 0;
*(line_origin + lines_ndx + 1) = i * 2 + 1;
lines_ndx += 2; if (L) printf("|=> lines_ndx = %3d space 3D\n", lines_ndx);
}
for (int i = 0; i < space_size_y; i++){
for (int i = 0; i <= space_size_y; i++){
*(line_origin + lines_ndx + 0) = i * 2 + 0;
*(line_origin + lines_ndx + 1) = i * 2 + 1;
lines_ndx += 2; if (L) printf("|=> lines_ndx = %3d space 3D\n", lines_ndx);
}
for (int i = 0; i < space_size_z; i++){
for (int i = 0; i <= space_size_z; i++){
*(line_origin + lines_ndx + 0) = i * 2 + 0;
*(line_origin + lines_ndx + 1) = i * 2 + 1;
lines_ndx += 2; if (L) printf("|=> lines_ndx = %3d space 3D\n", lines_ndx);

View File

@ -524,7 +524,7 @@ bool graphics_init_shaders(const void *gl_area)
GLubyte arrows[] = {
1, 1, 0, 0, 0,
1, 0, 1, 0, 0,
1, 0, 0, 0, 0,
1, 2, 4, 0, 0,
1, 0, 0, 1, 0,
1, 2, 0, 3, 0,
@ -539,10 +539,10 @@ GLubyte arrows[] = {
static void get_model_data_and_user_preferences(){
model_space_size_x = 3; // 1 < model_space_size_x
model_space_size_y = 2; // 1 < model_space_size_y
model_space_size_z = 1; // 1 < model_space_size_z
model_arrows_nb = 1; // assert : l'emplacement des flèches est contraint
model_space_size_x = 3; // 0 < model_space_size_x
model_space_size_y = 2; // 0 < model_space_size_y
model_space_size_z = 1; // 0 < model_space_size_z
model_arrows_nb = 2; // assert : l'emplacement des flèches est contraint
// par model_space_size_x, y, z et le nombre de sites
// pref_1D_shown_as_3D_xor_2D_space = 0; // 0 = 3D 1 = 2D