An algebraic framework for geometrically continuous splines