In this paper, a composite sine function is proposed and applied in a chaotic system, which is capable of generating definite number of chaotic attractors. The proposed composite sine function possesses infinite breakpoints, but it can produce a fixed number of scrolls by adjusting its parameters. Compared to other chaotic systems with multiple scrolls chaotic attractors, the realization circuit of the chaotic system with compound sine function allows obtaining different numbers of scrolls by adjusting only one resistance value. As a result, the circuit structure remains unchanged despite variations in the number of scrolls. Various analytical methods are applied to study the dynamical behaviors of the proposed chaotic system, including Lyapunov exponent, equilibrium point, bifurcation diagram,algorithm. Furthermore, phase diagram, spectral entropy and C0-based on the analysis of dynamical characteristics, theelectronic circuits of the proposed system are given on Multisim circuit simulationsoftware, and the multi-scroll chaotic attractors exhibit consistency with the numericalsimulation results. Finally, we incorporated the proposed chaotic system into a DNA coding algorithm for image encryption, and this method exhibits excellent encryption efficiency and high level of security.