improve functions to project onto vertex. Get rid of binary, but use gaussian or inverse function