The procedural formula of the ring?

Can anyone know the formula for building a ring with an outer radius, with an inner radius, and the number of segments based on batch_for_shader(shader, ‘TRIS’, {“pos”: vertices_outer}, indices=trisIndices)

I found a way to build a circle using the function

def draw_circle_2d_filled(shader, position, radius, color):
    mx = position[0]
    my = position[1]
    prefs = bpy.context.preferences.system
    radius = radius * (prefs.dpi * prefs.pixel_size / 72)
    sides = 60

    vertices = [(radius * cos(i * 2 * pi / sides) + mx,
                       radius * sin(i * 2 * pi / sides) + my)
                       for i in range(sides + 1)]
    batch = batch_for_shader(shader, 'TRI_FAN', {"pos": vertices})

    shader.bind()
    shader.uniform_float("color", color)
    batch.draw(shader)

I need to build a ring for the UI, so I need vertex positions in the 2D vector.

I plan to make a widget of the zbrush type

Thanks for help Nikita Akimov

def draw_ring_2d(position, outRad, inerRad, color):
    shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
    mx = position[0]
    my = position[1]

    sides = 60

    ring1 = []
    ring2 = []
    verts = []
    faces = []

    for i in range(sides):
        grad = (360 * i / sides) * pi / 180
        ring1.append([outRad * cos(grad) + mx, outRad * sin(grad) + my])
        ring2.append([inerRad * cos(grad) + mx, inerRad * sin(grad) + my])

        end = sides - 1
        if i == end:
            faces.append([i, i+1, i+sides])
            faces.append([i, i+1, i-i]) 
        else:
            faces.append([i, i+1, i+1+sides])
            faces.append([i, i+sides, i+1+sides])

       verts.extend(ring1)
       verts.extend(ring2)

       batch = batch_for_shader(shader, 'TRIS', {"pos": verts}, indices=faces)