This paper presents a filter approach for estimating the state of nonlinear dynamic systems based on recursive approximation of posterior densities by means of Dirac mixture functions. The filter consists of a prediction step and a filter step. The approximation approach is based on a systematic minimization of a distance measure and is hence optimal and deterministic. In contrast to non-deterministic methods we are able to determine the optimal number of components in the Dirac mixture. A further benefit of the proposed approach is the consideration of measurements during the approximation process in order to avoid parameter degradation.