Conjugate gradient algorithm and fractals