  Geometrically continuous splines are piecewise polynomial functions defined
on a collection of patches which are stitched together through transition maps.
They are called $G^{r}$-splines if, after composition with the transition maps,
they are continuously differentiable functions to order $r$ on each pair of
patches with stitched boundaries. This type of splines has been used to
represent smooth shapes with complex topology for which (parametric) spline
functions on fixed partitions are not sufficient. In this article, we develop
new algebraic tools to analyze $G^r$-spline spaces. We define $G^{r}$-domains
and transition maps using an algebraic approach, and establish an algebraic
criterion to determine whether a piecewise function is $G^r$-continuous on the
given domain. In the proposed framework, we construct a chain complex whose top
homology is isomorphic to the $G^{r}$-spline space. This complex generalizes
Billera-Schenck-Stillman homological complex used to study parametric splines.
Additionally, we show how previous constructions of $G^r$-splines fit into this
new algebraic framework, and present an algorithm to construct a bases for
$G^r$-spline spaces. We illustrate how our algebraic approach works with
concrete examples, and prove a dimension formula for the $G^r$-spline space in
terms of invariants to the chain complex. In some special cases, explicit
dimension formulas in terms of the degree of splines are also given.
