This study introduces a radiation avoidance algorithm to help radiological occupational personnel (ROP) avoid high radiation exposure in a radioactive environment. The premise of this study is that ROP can be designated as a movable point in a two-dimensional radioactive scene with known radioactive sources. A trajectory of ROP is generated by the radiation avoidance algorithm based on an artificial potential field (APF) and particle swarm optimization (PSO). In the algorithm, ROP is subjected to an attractive force from a target as well as multiple repulsive forces from multiple radioactive sources. The attractive force and repulsive forces drive ROP moving toward the target along the trajectory. APF has obvious difficulties with parameter selection and a local minima problem. So, we used the PSO algorithm to solve these difficulties of APF. Additionally, we developed a radiation avoidance simulation program using the C# programming language. Simulation experiments showed the proposed algorithm could be useful to meet the challenges of radiation avoidance applications that can be described as trajectory optimization problems.