O K P R I N T I N G + O K D R A W I N G
This commit is contained in:
parent
54bd80b9d0
commit
b8c0a57f4c
|
@ -92,5 +92,5 @@ static inline char *read_file(char *filename)
|
||||||
#define WEST 1 // - x cyan
|
#define WEST 1 // - x cyan
|
||||||
#define ZENITH 2 // + y vert
|
#define ZENITH 2 // + y vert
|
||||||
#define NADIR 3 // - y magenta
|
#define NADIR 3 // - y magenta
|
||||||
#define SOUTH 4 // - z jaune
|
#define SOUTH 4 // + z bleu
|
||||||
#define NORTH 5 // + z bleu
|
#define NORTH 5 // - z jaune
|
||||||
|
|
|
@ -37,6 +37,8 @@ int write_one_arrow_vertex (int space_X_int, int space_Y_int, int space_Z_int,
|
||||||
int weight, int site, int arrow_x, int arrow_y, int arrow_z, int print)
|
int weight, int site, int arrow_x, int arrow_y, int arrow_z, int print)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
printf("In write_one_arrow_vertex() site = %d\n", site);
|
||||||
|
|
||||||
float max = fmax(space_X_int, space_Y_int);
|
float max = fmax(space_X_int, space_Y_int);
|
||||||
max = fmax(max, space_Z_int);
|
max = fmax(max, space_Z_int);
|
||||||
|
|
||||||
|
@ -71,12 +73,12 @@ int write_one_arrow_vertex (int space_X_int, int space_Y_int, int space_Z_int,
|
||||||
graphics_write_color(0.6f, 0.1f, 0.7f);
|
graphics_write_color(0.6f, 0.1f, 0.7f);
|
||||||
break;
|
break;
|
||||||
case SOUTH:
|
case SOUTH:
|
||||||
graphics_write_vertex (vx, vy, vz - (site % 2 - 1) * (1 / max) + (site % 2 - 1) * arrow_tip_padding, print);
|
graphics_write_vertex (vx, vy, vz - (site % 2 + 1) * (1 / max) + (site % 2 + 1) * arrow_tip_padding, print);
|
||||||
graphics_write_color(1.0f, 1.0f, 0.0f);
|
graphics_write_color(0.05f, 0.4f, 1.0f);
|
||||||
break;
|
break;
|
||||||
case NORTH:
|
case NORTH:
|
||||||
graphics_write_vertex (vx, vy, vz - (site % 2) * (1 / max) + (site % 2) * arrow_tip_padding, print);
|
graphics_write_vertex (vx, vy, vz - (site % 2 - 2) * (1 / max) + (site % 2 - 2) * arrow_tip_padding, print);
|
||||||
graphics_write_color(0.05f, 0.4f, 1.0f);
|
graphics_write_color(1.0f, 1.0f, 0.0f);
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -735,7 +735,7 @@ static inline int set_arrow (struct arrow_t *arrows_ptr, int arrows_nb, int spac
|
||||||
void main_test_graphics (void)
|
void main_test_graphics (void)
|
||||||
{
|
{
|
||||||
srand(time(NULL)); int rand(void); void srand(unsigned int seed);
|
srand(time(NULL)); int rand(void); void srand(unsigned int seed);
|
||||||
int randomize = 7, console = 0, arrows_nb = 0, space_X = 1, space_Y = 1, space_Z = 1;
|
int randomize = 5, console = 0, arrows_nb = 0, space_X = 1, space_Y = 1, space_Z = 1;
|
||||||
if (randomize) {
|
if (randomize) {
|
||||||
space_X = 1 + rand() % randomize;
|
space_X = 1 + rand() % randomize;
|
||||||
space_Y = 1 + rand() % randomize;
|
space_Y = 1 + rand() % randomize;
|
||||||
|
@ -792,3 +792,4 @@ void main_test_graphics (void)
|
||||||
|
|
||||||
free(arrows_ptr); arrows_ptr = NULL; arrows_nb = 0;
|
free(arrows_ptr); arrows_ptr = NULL; arrows_nb = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue