from numpy import arange, pi, sin, cos, arccos
n = 50
goldenRatio = (1 + 5**0.5)/2
i = arange(0, n)
theta = 2 *pi * i / goldenRatio
phi = arccos(1 - 2*(i+0.5)/n)
x, y, z = cos(theta) * sin(phi), sin(theta) * sin(phi), cos(phi);
void generate_fib_sphere_vertices(u32 num_vertices, Array_List<V3>* out_positions) {
f32 golden_ratio_inv = 1.0f / 1.618033988749f;
f32 two_pi = 2.0f * 3.14159265358979323846f;
for (u32 i = 0; i < num_vertices; ++i) {
f32 theta = two_pi * i * golden_ratio_inv;
f32 phi = arccos(1 - 2*(i+0.5) / num_vertices);
out_vertices.append({
cos(theta) * sin(phi),
sin(theta) * sin(phi),
cos(phi);
});
}
}