Active Finite Voronoi

Build living tissue simulations with the active finite Voronoi model.

Latest vloading… loading…

PyAFV is a simple Python toolkit for generating 2D finite Voronoi tessellations, modeling cell mechanics, and exploring collective motility under active dynamics.

Active finite Voronoi model illustration

Geometric insight, physical fidelity

Compute areas, perimeters, vertices, edges, and conservative forces while visualizing emergent tissue structure in real time.

Why PyAFV?

Core capabilities

Finite Voronoi geometry

Generate and analyze finite Voronoi diagrams with rich geometric data: cell areas, perimeters, edges, vertices, and connectivity.

Active tissue dynamics

Activate motility and explore collective motion driven by self-propulsion, adhesion, and confinement.

Ready for experiments

Python ≥ 3.10 support, Cython-accelerated components, and clean APIs for integration into research workflows.

Install & simulate

Quick start

Install

$ pip install pyafv

or

$ conda install conda-forge::pyafv

Build a diagram

>>> import numpy as np
>>> import pyafv as afv
>>> N = 100
>>> pts = np.random.rand(N, 2) * 10
>>> params = afv.PhysicalParams(r=1.0)
>>> sim = afv.FiniteVoronoiSimulator(pts, params)
>>> sim.plot_2d(show=True)

Dig deeper

Access the full geometry and conservative forces via sim.build( ) and inspect the returned dictionary for areas, perimeters, edges, and vertices.

Examples & demos

Try it out

1. Jupyter notebooks on Google Colab

Explore a collection of usage examples in Jupyter notebooks — no local setup required.

2. Interactive simulation demo

See an interactive simulation demo using PyAFV on Prof. Dapeng (Max) Bi's homepage.

Simulation previews

Visual gallery

How to cite PyAFV

References

Recommended citation (Citing pyafv)

If you use PyAFV in your research, please cite it.  A paper associated with PyAFV has been posted to arXiv [1]:


[1] W. Wang and B. A. Camley, Divergence of detachment forces in the finite Voronoi model, arXiv preprint arXiv:2604.15481 (2026).

Here is a ready-made BibTeX entry:

@article{wang2026divergence,
  title   = {{Divergence of detachment forces in the finite Voronoi model}},
  author  = {Wang, Wei and Camley, Brian A},
  journal = {arXiv preprint arXiv:2604.15481},
  year    = {2026},
  doi     = {10.48550/arXiv.2604.15481}
}