parameters: (*args)
return_statement: return _robotsim.support_polygon(*args)
docstring: r"""
      support_polygon(double * contacts, int m, int n) -> PyObject
      support_polygon(doubleMatrix contactPositions, doubleMatrix frictionCones) -> PyObject *
  
  
      Calculates the support polygon for a given set of contacts and a downward
      external force (0,0,-g).  
  
      In the 1-argument version, a contact point is given by a list of 7 floats,
      [x,y,z,nx,ny,nz,k] as usual. The 2-argument version is a "fancy" version that
      allows more control over the constraint planes.  
  
      Args:  
  
           contacts (list of 7-float lists or tuples): the list of contacts, each
               specified as a 7-list or tuple [x,y,z,nx,ny,nz,k], with:
  
                   * (x,y,z): the contact position
                   * (nx,ny,nz): the contact normal
                   * k: the coefficient of friction (>= 0)
  
           contactPositions (list of 3-float lists or tuples): the list of contact
               point positions.
           frictionCones (list of lists): Each item of this list specifies linear
               inequalities that must be met of the force at the corresponding
               contact point.  The item must have length k*4 where k is an integer,
               and each inequality gives the entries (ax,ay,az,b) of a constraint
               ax*fx+ay*fy+az*fz <= b that limits the contact force (fx,fy,fz) at
               the i'th contact.  Each of the k 4-tuples is laid out sequentially
               per-contact.  
  
      Returns:  
  
          list of 3-tuples: The sorted plane boundaries of the support
          polygon. The format of a plane is (nx,ny,ofs) where (nx,ny) are the
          outward facing normals, and ofs is the offset from 0.  In other words
          to test stability of a com with x-y coordinates [x,y], you can test
          whether dot([nx,ny],[x,y]) <= ofs  for all planes.
  
          Hint: with numpy, you can do::
  
              Ab = np.array(supportPolygon(args))
              A=Ab[:,0:2]
              b=Ab[:,2]
              myComEquilibrium = lambda x: np.all(np.dot(A,x)<=b)
docstring_summary: r"""
      support_polygon(double * contacts, int m, int n) -> PyObject
      support_polygon(doubleMatrix contactPositions, doubleMatrix frictionCones) -> PyObject *
docstring_tokens: r support_polygon ( double * contacts int m int n ) - > PyObject support_polygon ( doubleMatrix contactPositions doubleMatrix frictionCones ) - > PyObject *
function: def support_polygon(*args) -> "PyObject *":
      r"""
      support_polygon(double * contacts, int m, int n) -> PyObject
      support_polygon(doubleMatrix contactPositions, doubleMatrix frictionCones) -> PyObject *
  
  
      Calculates the support polygon for a given set of contacts and a downward
      external force (0,0,-g).  
  
      In the 1-argument version, a contact point is given by a list of 7 floats,
      [x,y,z,nx,ny,nz,k] as usual. The 2-argument version is a "fancy" version that
      allows more control over the constraint planes.  
  
      Args:  
  
           contacts (list of 7-float lists or tuples): the list of contacts, each
               specified as a 7-list or tuple [x,y,z,nx,ny,nz,k], with:
  
                   * (x,y,z): the contact position
                   * (nx,ny,nz): the contact normal
                   * k: the coefficient of friction (>= 0)
  
           contactPositions (list of 3-float lists or tuples): the list of contact
               point positions.
           frictionCones (list of lists): Each item of this list specifies linear
               inequalities that must be met of the force at the corresponding
               contact point.  The item must have length k*4 where k is an integer,
               and each inequality gives the entries (ax,ay,az,b) of a constraint
               ax*fx+ay*fy+az*fz <= b that limits the contact force (fx,fy,fz) at
               the i'th contact.  Each of the k 4-tuples is laid out sequentially
               per-contact.  
  
      Returns:  
  
          list of 3-tuples: The sorted plane boundaries of the support
          polygon. The format of a plane is (nx,ny,ofs) where (nx,ny) are the
          outward facing normals, and ofs is the offset from 0.  In other words
          to test stability of a com with x-y coordinates [x,y], you can test
          whether dot([nx,ny],[x,y]) <= ofs  for all planes.
  
          Hint: with numpy, you can do::
  
              Ab = np.array(supportPolygon(args))
              A=Ab[:,0:2]
              b=Ab[:,2]
              myComEquilibrium = lambda x: np.all(np.dot(A,x)<=b)  
  
      """
      return _robotsim.support_polygon(*args)
function_tokens: def support_polygon ( * args ) -> "PyObject *" : return _robotsim . support_polygon ( * args )