def get_cylinder_radius(cell_geometry):
    """Return the radius the cylinder should have

    The cylinder have the same radius as the half-sphere that make the dots
    (the hidden and the shown part of the dots).
    The radius is such that the spherical cap with diameter
    cell_geometry.dot_diameter has a height of cell_geometry.dot_height.
    """
    h = cell_geometry.dot_height
    r = cell_geometry.dot_diameter / 2
    return (r ** 2 + h ** 2) / 2 / h