This paper presents a fast and high-precision three-dimensional magnetic anomaly forward algorithm on undulating terrain. Firslty, The forward algorithm for three-dimensional magnetic anomalies on a horizontal observation surface is developed with the Block-Toeplitz-Toeplitz-Block (BTTB) matrix. In the proposed algorithm, the
cuboid elements are used to divide the underground space. And the position of the observation point is set as
the projection of the central point of the cuboid element onto the observation surface. With the symmetry
of the BTTB matrix, the coefficient matrix is compressed and stored to reduces the memory requirements during
the computation process. In order to deal with the coefficient matrix and parameter vector computations, the
matrix cross-multiplication computation is transformed into a point-multiplication computation with the fast
Fourier transform (FFT) method. Then, to solve the problem of undulating terrain, a hierarchical interpolation
method is proposed in forward algorithm, in which the undulating terrain is divided into several horizontal observation surfaces. Subsequently, the magnetic field on the undulating terrain is interpolated. Some 3D models
with horizontal observation surface and undulating terrain are tested to verify the proposed algorithm. The results show that the forward algorithm has the advantages of fast computation speed, high precision, and low
memory requirement. It is suitable for large-scale (ten millions of nodes) three-dimensional magnetic forward
modeling