Solved that one, now it seems I'm running into trouble with the random number generator (default srand). I have to keep a bit of a tighter ship now and reinitialise more often, since the goal is to enable generation of selective stars. Luckily I had this prepared beforehand already, every star has its own seed.
but it doesn't really look that way. Indeed, the cubes form earily regular geometric shapes, which seems mostly due to the random numbers generatoed for the stars being awfully close to each other. Here's an example:
Stars with the seed 36123393112042 to ...48 get the following values for their x positions:
1.8239387
-4.8962369
-1.6161077
1.6643269
-4.9444561
-1.7754143
1.5047151
So far nothing special, but stars with the seed 36123393113042 to ...48 get very similiar values:
1.9771416
-4.743044
-1.4625995
1.8175298
-4.9023409
-1.622213
1.6579180
(All numbers are supposed to be between -5 and 5). I assume a possible cause of this is that srand should be seeded with an integer, and I guess it mangles the double I pass it. Still that doesn't explain why the sequence is so similiar but still not the same. The stars in the cubes form rather accurate diagonal patterns that are aligned with each other along each axis (i.e. you can see lines of stars along the general directions of the x-axis, y-axis and z- axis), see attached screenshot. Honestly I couldn't align them like that if I wanted to, so what on earth is going on here?
but it doesn't really look that way. Indeed, the cubes form earily regular geometric shapes, which seems mostly due to the random numbers generatoed for the stars being awfully close to each other. Here's an example:
Stars with the seed 36123393112042 to ...48 get the following values for their x positions:
1.8239387
-4.8962369
-1.6161077
1.6643269
-4.9444561
-1.7754143
1.5047151
So far nothing special, but stars with the seed 36123393113042 to ...48 get very similiar values:
1.9771416
-4.743044
-1.4625995
1.8175298
-4.9023409
-1.622213
1.6579180
(All numbers are supposed to be between -5 and 5). I assume a possible cause of this is that srand should be seeded with an integer, and I guess it mangles the double I pass it. Still that doesn't explain why the sequence is so similiar but still not the same. The stars in the cubes form rather accurate diagonal patterns that are aligned with each other along each axis (i.e. you can see lines of stars along the general directions of the x-axis, y-axis and z- axis), see attached screenshot. Honestly I couldn't align them like that if I wanted to, so what on earth is going on here?
Attachments
Last edited: