Skip to content

MATLAB mex files to run Voro++ for the calculation of 2D and 3D Laguerre diagrams (power diagrams/radical Voronoi tessellations)

License

Notifications You must be signed in to change notification settings

smr29git/MATLAB-Voro

Repository files navigation

MATLAB-Voro: MATLAB mex files for the Voro++ software library

MATLAB mex files to run Voro++ for calculating Laguerre diagrams/power diagrams in 2D and 3D periodic and non-periodic domains.

Installation

  • Download and change directory to the top-level.
  • In MATLAB, run the scripts makemex.m and makemex2d.m

Examples

See the MATLAB live scripts Examples2d.mlx and Examples3d.mlx or the corresponding PDF files Examples2d.pdf and Examples3d.pdf.

Voro++

This code relies on Voro++ by Chris H. Rycroft:

When using this code please consider citing the following paper:

  • Chris H. Rycroft, "Voro++: A three-dimensional Voronoi cell library in C++", Chaos 19, 041111 (2009).

The folder voro_src is a snapshot of Voro++. We modified the files cell_2d.cc, cell_2d.hh, cell.cc and cell.hh to compute the second moments of the Laguerre cells.

Licence

See LICENCE.md

Software limitations

  • The domain of the Laguerre tessellation must be a box (a rectangle in 2D or a cuboid in 3D). In particular, the code does not compute unbounded Laguerre tessellations or, e.g., Laguerre tessellations of polygonal domains.
  • 3D code: If the Laguerre tessellation is non-periodic, then all the seeds must lie inside the bounding box, otherwise they are simply discarded. This limitation does not apply to the 3D periodic code or the 2D code.
  • 3D code: The Laguerre tessellation must be either non-periodic or triply periodic (periodic in all 3 directions). This limitation does not apply to the 2D code, where you can choose the diagram to be periodic in the x- or y-directions (Laguerre tessellation of a flat cylinder), both directions (Laguerre tessellation of a flat torus) or neither direction.

We plan to address some of these limitations in a future update, as well as adding more sophisticated visualisation tools.

Related software

Main contributors

This repository was created by

  • Steve Roper, University of Glasgow
  • David Bourne, Heriot-Watt University and the Maxwell Institute for Mathematical Sciences

This code was used to create Laguerre tessellations for the following paper:

  • Bourne, D.P., Kok, P.J.J., Roper, S.M. & Spanjer, W.D.T. (2020) Laguerre tessellations and polycrystalline microstructures: A fast algorithm for generating grains of given volumes, Philosophical Magazine, 100, 2677-2707. https://doi.org/10.1080/14786435.2020.1790053

Please consider citing this paper if you find our code useful.

About

MATLAB mex files to run Voro++ for the calculation of 2D and 3D Laguerre diagrams (power diagrams/radical Voronoi tessellations)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published