We present an algorithm that takes as input any element B of the loop braid group and constructs a polynomial f : R 5 → R 2 such that the intersection of the vanishing set of f and the unit 4-sphere contains the closure of B. The polynomials can be used to create real analytic time-dependent vector fields with zero divergence and closed flow lines that move as prescribed by B. We also show how a family of surface braids in C × S 1 × S 1 without branch points can be constructed as the vanishing set of a holomorphic polynomialBoth constructions allow us to give upper bounds on the degree of the polynomials.