Code Monkey home page Code Monkey logo

matlab-voro's Introduction

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.

matlab-voro's People

Contributors

dpbourne avatar smr29git avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.