예제 #1
0
def poly_area(x1,x2,p1,p2):
    p = pa.polyadd(p1,-p2)
    i = np.polyint(p)
    return np.abs( np.polyval(i,x2) - np.polyval(i,x1))
예제 #2
0
def poly_area(x1,x2,p1,p2=np.zeros(1)):
    if p2 == []:
        p2 = np.zeros(1)
    p = pa.polyadd(p1,-p2)
    i = np.polyint(p)
    return np.abs( np.polyval(i,x2) - np.polyval(i,x1))
예제 #3
0
def polyintersec(p1,p2):
    r = np.roots(polyadd(p1,-p2))
    x = r[np.isreal(r)]
    y = np.polyval(p1,x)
    return x,y