## 1 Introduction  
The 'axicon', first introduced by [PERSON] in 1954 [1], provides the most efficient method to produce zero-order Bessel beams. The zero-order Bessel beam, also called a nondiffracting beam, has many advantages in that the size and shape of the central spot remains constant [2]. Nondiffracting beams have been used in many fields: laser machining [3], extending the depth of a field [4], measuring multidegree-of-freedom error motions [5], and 3D shape measurement [6]. [PERSON] et al. used the negative and positive axicons to change the diameter of the Bessel beam ring for ablating corneal material for corneal surgery [7].  
The range of the nondiffracting beams, generated by a real axicon, is dependent on the parameters of the axicon (the diameter and refractive angle). Sometimes with the need of changing measurement ranges, it has to replace axicons with different refractive angles or tune the cone angle (refractive angle) of the axicon. It is not convenient to replace the axicon and adjust the optical path, and it is a difficult task to vary the cone angle [8]. The fabrication errors of the axicon will also influence the quality of the nondiffracting beams and its applications. Therefore, it is interesting to present a method to simulate axicons, which can dynamically and flexibly alter the parameters of the axicon without fabrication errors.  
Many methods have been attempted to realize tunable axicons. [PERSON] et al. used computer-generated aspheric holographic optical elements to achieve an axilens [9], which combines the properties of an axicon and a spherical lens. In 2014, [PERSON] et al. proposed an approach based on nematic liquid crystal and phase-shifted electrical signals to obtain lensacons, logarithmic and linear axicons [8]. [PERSON] et al. obtained tunable Bessel beams with a fluidic axicon, which is filled with refractive index variable liquid. The shortcoming of this method is that it needs a real glass axicon as a model [10]. Some scholars used the computer-generated holograms (CGHs) to achieve an approximately diffraction-free, arbitrary-order Bessel beam series [11; 12; 13; 14; 15]. The holograms were fabricated as phase-only structures by using the more-sophisticated techniques of photolithography. However, due to the limitation of the phase level (normally \(\leq\)4), the Bessel beams were not perfect, and this method cannot dynamically obtain tunable Bessel beams. Spatial light modulators, which can alert the amplitude and phase of the beams with programmable holograms, have been applied to generate tunable Bessel beams [16]. The authors used 64-level phase holograms to control the size and deflection angle of the beam. The phase level is not high, and the zero-order Bessel beam was not analyzed.  
In this paper, the spatial light modulator (SLM) was applied to simulate the positive and negative axicons with 256-level phase CGHs. Based on the principle of blazed grating and Fresnel diffraction, the intensity distributions are derived when the axicons are illuminated by Gaussian beams. The diffraction patterns are obtained as zero-order Bessel beams and annular hollow beams, corresponding to the positive and negative axicons. Experimental results verified that the diffraction patterns have the same distribution as the real axicon. The types of the axicon and the axicon's parameters can be easily altered through changing the CGHs. This method can dynamically generate tunable axicons without fabrication errors to suit different applications.