Manimouse_Beta.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Manimouse 作者: shivamkajale 项目源码 文件源码
def setCursorPos( yc, pyp):

    yp = np.zeros(2)

    if abs(yc[0]-pyp[0])<5 and abs(yc[1]-pyp[1])<5:
        yp[0] = yc[0] + .7*(pyp[0]-yc[0]) 
        yp[1] = yc[1] + .7*(pyp[1]-yc[1])
    else:
        yp[0] = yc[0] + .1*(pyp[0]-yc[0])
        yp[1] = yc[1] + .1*(pyp[1]-yc[1])

    return yp

# Depending upon the relative positions of the three centroids, this function chooses whether 
# the user desires free movement of cursor, left click, right click or dragging
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号