# Generate points on the surface of a semi-sphere

I would like to generate points on the surface of a semi-sphere (given the coordinates of its center), in a NON random way, not even quasi-random, possibly. I would prefer consecutive generated points to be spatially one near to the other, as far as it is possible. Is there a smart way of spanning the surface of a semi-sphere? Possibly in a scalable way, meaning that I can adjust the incremental step so that I can decide the resolution of the points.

I am writing it in C++, so if you have a piece of code in C++ it would be extremely useful. Otherwise, also pseudo-code would be extremely useful. Thank you.

Is this ros related at all? If for example you were wanting to publish a sphere rviz triangle list

`Marker`

there is https://github.com/lucasw/bgfx_ros/bl...It is ROS related since I will want to spawn those points using the Rviz Markers, but I know how to do that. My problem is the generation of the points. If you know how to do that, it would be really helpful.

In the link I provided a set of points is generated in a sphere in a uniform way (though they get dense near the poles) in python which is as good as pseudo-code. By offsetting and scaling phi and theta it could be limited to a subsection of the sphere surface instead of the whole thing.

Consecutive points are near each other except when phi increments, but you could reverse the direction every other row. But for help with anything fancier and you are better off on a specific stackexchange site.

Great, this is exactly what I was looking for. Thank you very much. If you answer to the question here below, I will confirm yours as the right answer.