Computational algorithms modeling the insertion of endovascular devices, such as coil or stents, have gained an increasing interest in recent years. This scientific enthusiasm is due to the potential impact that these techniques have to support clinicians by understanding the intravascular hemodynamics and predicting treatment outcomes. In this work, a virtual coiling technique for treating image-based aneurysm models is proposed. A dynamic path planning was used to mimic the structure and distribution of coils inside aneurysm cavities, and to reach high packing densities, which is desirable by clinicians when treating with coils. Several tests were done to evaluate the performance on idealized and image-based aneurysm models. The proposed technique was validated using clinical information of real coiled aneurysms. The virtual coiling technique reproduces the macroscopic behavior of inserted coils and properly captures the densities, shapes and coil distributions inside aneurysm cavities. A practical application was performed by assessing the local hemodynamic after coiling using computational fluid dynamics (CFD). Wall shear stress and intra-aneurysmal velocities were reduced after coiling. Additionally, CFD simulations show that coils decrease the amount of contrast entering the aneurysm and increase its residence time.