Function shear

shear(u,v) takes two $n$-dimensional vectors $u$ and $v$, and returns a transformation that shears any given point $x$ in the direction $u$ according to its extent along the direction $v$.