def triangle_image(tup, p1, p2, p3):

    y, x = tup

    x1 = p1[0]
    x2 = p2[0]
    x3 = p3[0]
    y1 = p1[1]
    y2 = p2[1]
    y3 = p3[1]

    aden = (y2 - y3)*(x - x3) + (x3 - x2)*(y - y3)
    adiv = (y2 - y3)*(x1 - x3) + (x3 - x2)*(y1 - y3)
    bden = (y3 - y1)*(x - x3) + (x1 - x3)*(y - y3)
    bdiv = (y2 - y3)*(x1 - x3) + (x3 - x2)*(y1 - y3)

    if np.isclose(adiv,0.):
        a = 0.
    else:
        a = aden / adiv

    if np.isclose(bdiv,0.):
        b = 0.
    else:
        b = bden / bdiv


#    a = ((y2 - y3)*(x - x3) + (x3 - x2)*(y - y3)) / ((y2 - y3)*(x1 - x3) + (x3 - x2)*(y1 - y3))
#    b = ((y3 - y1)*(x - x3) + (x1 - x3)*(y - y3)) / ((y2 - y3)*(x1 - x3) + (x3 - x2)*(y1 - y3))
    c = 1 - a - b

    T = (a>=0) & (a<=1) & (b>=0) & (b<=1) & (c>=0) & (c<=1)

    return(T)
Loads the most recent photos (72hrs).
dataset/ETHPy150Open mkenworthy/exorings/starspot/isocosa.py/triangle_image--crossover with--dataset/ETHPy150Open thesamet/webilder/src/webilder/WebilderDesktop.py/WebilderDesktopWindow.load_recent_photos