Payne325 / point-gen

Generates point sets for 3D shapes.
GNU General Public License v3.0
1 stars 0 forks source link

Sphere points share values for axes #7

Open Payne325 opened 4 years ago

Payne325 commented 4 years ago

When generating points that lie on a sphere, the initial points generated do not appear to be truely random as values recur in subsequent points in the following pattern:

P1 = (a, b, c) P2 = (b, c, d) P3 = (c, d, e)

Note that this is when the point is first generated. The function later manipulates the point which obfuscates this lack of randomness.

This was discovered by reading through the code. If this project had more contributors someone else could have reviewed this and stopped this silly mistake being pushed to develop.

The cause is incorrect iteration through the range of the desired number of points, should probably iterate through the randomly generated values, incrementing by 3 each time.