def sphere(radius=<NUM_LIT:0.5>, sectors=<NUM_LIT:32>, rings=<NUM_LIT:16>) -> VAO:
R = <NUM_LIT:1.0> / (rings - <NUM_LIT:1>)<EOL>S = <NUM_LIT:1.0> / (sectors - <NUM_LIT:1>)<EOL>vertices = [<NUM_LIT:0>] * (rings * sectors * <NUM_LIT:3>)<EOL>normals = [<NUM_LIT:0>] * (rings * sectors * <NUM_LIT:3>)<EOL>uvs = [<NUM_LIT:0>] * (rings * sectors * <NUM_LIT:2>)<EOL>v, n, t = <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0><EOL>for r in range(rings):<EOL><INDENT>for s in range(sectors):<EOL><INDENT>y = math.sin(-math.pi / <NUM_LIT:2> + math.pi * r * R)<EOL>x = math.cos(<NUM_LIT:2> * math.pi * s * S) * math.sin(math.pi * r * R)<EOL>z = math.sin(<NUM_LIT:2> * math.pi * s * S) * math.sin(math.pi * r * R)<EOL>uvs[t] = s * S<EOL>uvs[t + <NUM_LIT:1>] = r * R<EOL>vertices[v] = x * radius<EOL>vertices[v + <NUM_LIT:1>] = y * radius<EOL>vertices[v + <NUM_LIT:2>] = z * radius<EOL>normals[n] = x<EOL>normals[n + <NUM_LIT:1>] = y<EOL>normals[n + <NUM_LIT:2>] = z<EOL>t += <NUM_LIT:2><EOL>v += <NUM_LIT:3><EOL>n += <NUM_LIT:3><EOL><DEDENT><DEDENT>indices = [<NUM_LIT:0>] * rings * sectors * <NUM_LIT:6><EOL>i = <NUM_LIT:0><EOL>for r in range(rings - <NUM_LIT:1>):<EOL><INDENT>for s in range(sectors - <NUM_LIT:1>):<EOL><INDENT>indices[i] = r * sectors + s<EOL>indices[i + <NUM_LIT:1>] = (r + <NUM_LIT:1>) * sectors + (s + <NUM_LIT:1>)<EOL>indices[i + <NUM_LIT:2>] = r * sectors + (s + <NUM_LIT:1>)<EOL>indices[i + <NUM_LIT:3>] = r * sectors + s<EOL>indices[i + <NUM_LIT:4>] = (r + <NUM_LIT:1>) * sectors + s<EOL>indices[i + <NUM_LIT:5>] = (r + <NUM_LIT:1>) * sectors + (s + <NUM_LIT:1>)<EOL>i += <NUM_LIT:6><EOL><DEDENT><DEDENT>vbo_vertices = numpy.array(vertices, dtype=numpy.float32)<EOL>vbo_normals = numpy.array(normals, dtype=numpy.float32)<EOL>vbo_uvs = numpy.array(uvs, dtype=numpy.float32)<EOL>vbo_elements = numpy.array(indices, dtype=numpy.uint32)<EOL>vao = VAO("<STR_LIT>", mode=mlg.TRIANGLES)<EOL>vao.buffer(vbo_vertices, '<STR_LIT>', ['<STR_LIT>'])<EOL>vao.buffer(vbo_normals, '<STR_LIT>', ['<STR_LIT>'])<EOL>vao.buffer(vbo_uvs, '<STR_LIT>', ['<STR_LIT>'])<EOL>vao.index_buffer(vbo_elements, index_element_size=<NUM_LIT:4>)<EOL>return vao<EOL>
Creates a sphere.

Keyword Args:
    radius (float): Radius or the sphere
    rings (int): number or horizontal rings
    sectors (int): number of vertical segments

Returns:
    A :py:class:`demosys.opengl.vao.VAO` instance