  In this paper, we consider modular local polynomials. These functions satisfy
modularity while they are locally defined as polynomials outside of an
exceptional set. We prove an inequality for the dimension of the space of such
forms when the exceptional set is given by certain natural geodesics related to
binary quadratic forms of (positive) discriminant $D$. We furthermore show that
the dimension is the largest possible if and only if $D$ is an even square.
Following this, we describe how to use the methods developped in this paper to
establish an algorithm which explicitly determines the space of modular local
polynomials for each $D$.
