Simulation of field theories in wavelet representation