parameters: (pos, rad, color, id='cgo', extend=1, transparent=0, transparency=0.5)
return_statement: return 1
docstring: create a sphere
   
      Arguments:
        pos: a 3 tuple with the position of the sphere
        rad: a float with the radius
        color: a 3 tuple with the color of the sphere. (1,1,1) is white
        id: (OPTIONAL) the name of the object to be created
        extend: (OPTIONAL) if this is nonzero, the object will be cleared
          before adding the new sphere.  Otherwise the sphere is appended
          to the ojbect
        transparent: (OPTIONAL) sets the object to be transparent
        transparency: (OPTIONAL) the percent transparency of the object
docstring_summary: create a sphere
   
      Arguments:
        pos: a 3 tuple with the position of the sphere
        rad: a float with the radius
        color: a 3 tuple with the color of the sphere. (1,1,1) is white
        id: (OPTIONAL) the name of the object to be created
        extend: (OPTIONAL) if this is nonzero, the object will be cleared
          before adding the new sphere.  Otherwise the sphere is appended
          to the ojbect
        transparent: (OPTIONAL) sets the object to be transparent
        transparency: (OPTIONAL) the percent transparency of the object
docstring_tokens: create a sphere Arguments : pos : a 3 tuple with the position of the sphere rad : a float with the radius color : a 3 tuple with the color of the sphere . ( 1 1 1 ) is white id : ( OPTIONAL ) the name of the object to be created extend : ( OPTIONAL ) if this is nonzero the object will be cleared before adding the new sphere . Otherwise the sphere is appended to the ojbect transparent : ( OPTIONAL ) sets the object to be transparent transparency : ( OPTIONAL ) the percent transparency of the object
function: def rpcSphere(pos, rad, color, id='cgo', extend=1, transparent=0, transparency=0.5):
    """ create a sphere
   
      Arguments:
        pos: a 3 tuple with the position of the sphere
        rad: a float with the radius
        color: a 3 tuple with the color of the sphere. (1,1,1) is white
        id: (OPTIONAL) the name of the object to be created
        extend: (OPTIONAL) if this is nonzero, the object will be cleared
          before adding the new sphere.  Otherwise the sphere is appended
          to the ojbect
        transparent: (OPTIONAL) sets the object to be transparent
        transparency: (OPTIONAL) the percent transparency of the object
    """
    r, g, b = color
    x, y, z = pos
    if extend:
      obj = cgoDict.get(id, [])
    else:
      obj = []
    if not transparent:
      o = []
    else:
      o = [cgo.ALPHA, 1 - transparency]
    o.extend([cgo.COLOR, r, g, b, cgo.SPHERE, x, y, z, rad])
    obj.extend(o)
    cgoDict[id] = obj
    cmd.load_cgo(obj, id, 1)
    return 1
function_tokens: def rpcSphere ( pos , rad , color , id = 'cgo' , extend = 1 , transparent = 0 , transparency = 0.5 ) : r , g , b = color x , y , z = pos if extend : obj = cgoDict . get ( id , [ ] ) else : obj = [ ] if not transparent : o = [ ] else : o = [ cgo . ALPHA , 1 - transparency ] o . extend ( [ cgo . COLOR , r , g , b , cgo . SPHERE , x , y , z , rad ] ) obj . extend ( o ) cgoDict [ id ] = obj cmd . load_cgo ( obj , id , 1 ) return 1