I've come across a formula for the volume of a segment of sphere as given in the picture below.

The problem is Im not able to find that formula anywhere else other than in a local textbook of engineering. I doubt even if that formula exists. If that formula exists can you please mention to which particular geometric shape's volume does the formula belong to.
This is known as a spherical cap:
$$V=\frac{\pi h^2}{3}(3r-h)=\frac{\pi h^2}{6}(3D-2h)$$