This paper aims at presenting petal-shaped optical vortices using a one-dimensional photonic crystal nanostructure with a graded-index defect layer under the irradiation of a Gaussian beam. A manufacturable graded-index medium with a spatial refractive index distribution function is introduced into the defect layer. Petal-shaped vortices, which are known as dark traps, with engineerable petal numbers are obtained on the output intensity plane. The transfer matrix method under the incident Gaussian beam is applied to simulate the results. As a potential application, we suggest an optical microparticle-sorting device using the introduced modulated optical vortices. The proposed device can benefit microfluidic and optofluidic lab-on-a-chip devices.