Method for Computer Simulation of Chaotic and Complex Periodic Oscillations