We propose a point cloud and mesh generation algorithm, particle injection mesh generator (PIMesh), that can be used to generate optimized high‐quality point clouds and unstructured meshes for domains in any shape with minimum (or even no) user intervention. The domains can be scanned images in OBJ format in 2D and 3D or just a line drawing in 2D. Mesh grading can also be easily controlled. The PIMesh is robust and easy to be implemented and is useful for a variety of applications, ranging from generating point clouds for meshless methods, mesh generation for finite element methods, computer graphics applications and surgical simulators. The core idea of the PIMesh is that a mesh domain is considered as an “airtight container” into which particles are “injected” at one or multiple selected interior points. The motion of the particles is controlled by a pseudo‐molecular dynamics (PMD) formulation with a pairwise purely repelling “force” moderated by an absolute velocity dependent drag force. The particles repel each other and occupy the whole domain somewhat like blowing up a balloon. When the container is full of particles and the motion is stopped (the particles can be considered as a point cloud), a Delaunay triangulation algorithm is employed to link the particles together to generate an unstructured mesh. The performance of the PIMesh and the comparison with other unstructured mesh generation approaches are demonstrated through generating node distributions and meshes for several 2D and 3D object domains including a scanned image of bones and others.