Mechanism of spiral formation in heterogeneous discretized excitable media.