WIP: 12 lignes et un début de méthode...
This commit is contained in:
parent
2efcd07239
commit
c24e93e6df
|
@ -52,7 +52,7 @@ void write_space_ridges (long x, long y, long z)
|
|||
|
||||
void write_marks_along_space_ridges (long x, long y, long z)
|
||||
{
|
||||
float i, j, k, vx, vy, vz, max = fmax(x, y);
|
||||
float i, j, k, vx, vy, vz, max = fmax(x, y); int kin = 0;
|
||||
max = fmax(max, z);
|
||||
|
||||
for (i = 0; i <= x; i++)
|
||||
|
@ -64,48 +64,68 @@ void write_marks_along_space_ridges (long x, long y, long z)
|
|||
vz = (2 * k / z - 1) * z / max;
|
||||
|
||||
if (
|
||||
(i == 0 && j == 0) || (i == 0 && j == y) || (i == x && j == 0) || (i == x && j == y)
|
||||
|| (i == 0 && k == 0) || (i == 0 && k == z) || (i == x && k == 0) || (i == x && k == z)
|
||||
|| (j == 0 && k == 0) || (j == 0 && k == z) || (j == y && k == 0) || (j == y && k == z)
|
||||
)
|
||||
graphics_write_vertex (vx, vy, vz);
|
||||
(i == 0 && j == 0 && k > 0 && k < z)
|
||||
|| (i == 0 && j == y && k > 0 && k < z)
|
||||
|| (i == x && j == 0 && k > 0 && k < z)
|
||||
|| (i == x && j == y && k > 0 && k < z)
|
||||
|| (i == 0 && k == 0 && j > 0 && j < y)
|
||||
|| (i == 0 && k == z && j > 0 && j < y)
|
||||
|| (i == x && k == 0 && j > 0 && j < y)
|
||||
|| (i == x && k == z && j > 0 && j < y)
|
||||
|| (j == 0 && k == 0 && i > 0 && i < x)
|
||||
|| (j == 0 && k == z && i > 0 && i < x)
|
||||
|| (j == y && k == 0 && i > 0 && i < x)
|
||||
|| (j == y && k == z && i > 0 && i < x)
|
||||
) {
|
||||
kin ++;
|
||||
graphics_write_vertex (vx, vy, vz);
|
||||
}
|
||||
};
|
||||
printf("n = %d\n", kin);
|
||||
|
||||
int vertex_offset = 8;
|
||||
|
||||
graphics_write_line (vertex_offset + 0, vertex_offset + 6); //
|
||||
graphics_write_line (vertex_offset + 1, vertex_offset + 7); //
|
||||
|
||||
graphics_write_line (vertex_offset + 2, vertex_offset + 3); //
|
||||
graphics_write_line (vertex_offset + 4, vertex_offset + 5); //
|
||||
|
||||
graphics_write_line (vertex_offset + 8, vertex_offset + 9); //
|
||||
graphics_write_line (vertex_offset + 12, vertex_offset + 13); //
|
||||
|
||||
graphics_write_line (vertex_offset + 10, vertex_offset + 11); //
|
||||
graphics_write_line (vertex_offset + 14, vertex_offset + 15); //
|
||||
|
||||
graphics_write_line (vertex_offset + 18, vertex_offset + 19); //
|
||||
graphics_write_line (vertex_offset + 20, vertex_offset + 21); //
|
||||
|
||||
graphics_write_line (vertex_offset + 16, vertex_offset + 22); //
|
||||
graphics_write_line (vertex_offset + 17, vertex_offset + 23); //
|
||||
|
||||
/* graphics_write_line (buffer_lines_offset + 20, buffer_lines_offset + 21); */
|
||||
/* graphics_write_line (buffer_lines_offset + 22, buffer_lines_offset + 23); */
|
||||
|
||||
/* graphics_write_line (buffer_lines_offset + 1, buffer_lines_offset + 21); */
|
||||
/* graphics_write_line (buffer_lines_offset + 2, buffer_lines_offset + 22); */
|
||||
|
||||
/* graphics_write_line (buffer_lines_offset + 0, buffer_lines_offset + 20); */
|
||||
/* graphics_write_line (buffer_lines_offset + 3, buffer_lines_offset + 23); */
|
||||
|
||||
/* graphics_write_line (buffer_lines_offset + 17, buffer_lines_offset + 25); */
|
||||
/* graphics_write_line (buffer_lines_offset + 18, buffer_lines_offset + 26); */
|
||||
|
||||
/* graphics_write_line (buffer_lines_offset + 5, buffer_lines_offset + 25); */
|
||||
/* graphics_write_line (buffer_lines_offset + 6, buffer_lines_offset + 26); */
|
||||
|
||||
|
||||
int buffer_lines_offset = 12;
|
||||
/* graphics_write_line (buffer_lines_offset + 5, buffer_lines_offset + 25); */
|
||||
/* graphics_write_line (buffer_lines_offset + 6, buffer_lines_offset + 26); */
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 5, buffer_lines_offset + 25);
|
||||
graphics_write_line (buffer_lines_offset + 6, buffer_lines_offset + 26);
|
||||
/* graphics_write_line (buffer_lines_offset + 0, buffer_lines_offset + 1); */
|
||||
/* graphics_write_line (buffer_lines_offset + 1, buffer_lines_offset + 2); */
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 1, buffer_lines_offset + 0);
|
||||
graphics_write_line (buffer_lines_offset + 2, buffer_lines_offset + 3);
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 8, buffer_lines_offset + 9);
|
||||
graphics_write_line (buffer_lines_offset + 10, buffer_lines_offset + 11);
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 9, buffer_lines_offset + 11);
|
||||
graphics_write_line (buffer_lines_offset + 8, buffer_lines_offset + 10);
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 12, buffer_lines_offset + 13);
|
||||
graphics_write_line (buffer_lines_offset + 14, buffer_lines_offset + 15);
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 12, buffer_lines_offset + 14);
|
||||
graphics_write_line (buffer_lines_offset + 13, buffer_lines_offset + 15);
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 20, buffer_lines_offset + 21);
|
||||
graphics_write_line (buffer_lines_offset + 22, buffer_lines_offset + 23);
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 1, buffer_lines_offset + 21);
|
||||
graphics_write_line (buffer_lines_offset + 2, buffer_lines_offset + 22);
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 0, buffer_lines_offset + 20);
|
||||
graphics_write_line (buffer_lines_offset + 3, buffer_lines_offset + 23);
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 17, buffer_lines_offset + 25);
|
||||
graphics_write_line (buffer_lines_offset + 18, buffer_lines_offset + 26);
|
||||
|
||||
graphics_write_line (buffer_lines_offset + 5, buffer_lines_offset + 25);
|
||||
graphics_write_line (buffer_lines_offset + 6, buffer_lines_offset + 26);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue