The code is adopted from the paper titled “Simulation of active Brownian motion of microswimmer” by Volpe et al.