get_random_sphere_vertices#

diffsims.generators.sphere_mesh_generators.get_random_sphere_vertices(resolution, seed=None)[source]#

Create a mesh that randomly samples the surface of a sphere

Parameters:
  • resolution (float) – The expected mean angle between nearest neighbor grid points in degrees.

  • seed (int, optional) – passed to np.random.default_rng(), defaults to None which will give a “new” random result each time

Returns:

points_in_cartesian – Rows are x, y, z where z is the 001 pole direction

Return type:

numpy.ndarray (N,3)

References

https://mathworld.wolfram.com/SpherePointPicking.html