Skip to main content

PyAOF

PyPI Python License Tests

PyAOF is a Python library for computing Average Outward Flux (AOF) on 3D meshes using NVIDIA Warp.


Features

  • Compute Average Outward Flux (AOF) volumes
  • Efficient tiled computation for large volumes
  • Optional 3D visualization with Polyscope and Matplotlib

Installation

Basic Installation

pip install pyaof

Installation with Visualization Support

If you want to run the visualization examples that render 3D meshes and point clouds (requires matplotlib and polyscope):

pip install "pyaof[viz]"

Developer Installation

If you are contributing to the project or want to run the local test suite and coverage tools, install the test dependencies:

pip install "pyaof[test]"

Install Everything

To install all optional dependencies at once:

pip install "pyaof[all]"

Quick Start

import vtk
from pyaof import compute_aof, compute_sdf

# 1. Load mesh
reader = vtk.vtkOBJReader()
reader.SetFileName("data/cuboid.obj")
reader.Update()
mesh = reader.GetOutput()

# 2. Compute Signed Distance Field (SDF)
sdf, normalized_mesh, mesh_vertices, spacing = compute_sdf(
    mesh,
    resolution=1000,
    normalize=True
)

# 3. Compute Average Outward Flux (AOF)
aof_vol = compute_aof(
    sdf,
    tile_size=1024
)

Examples

The examples/ directory contains full usage demonstrations, including:

  • Mesh loading and preprocessing
  • SDF generation
  • AOF computation
  • 3D visualization using Polyscope

Run an example:

python examples/demo_polyscope.py

Cuboid Demo


Requirements

  • Python 3.12+
  • NumPy
  • VTK
  • SciPy

Optional visualization dependencies:

  • Matplotlib
  • Polyscope

License

MIT License


Citation

If you use PyAOF in academic work, please cite the repository and related publications.

Metadata

Release files for pyaof 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyaof 0.1.3
File Size Uploaded
pyaof-0.1.3.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyaof 0.1.3
File Interpreter ABI Platform
pyaof-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 41.0 kB

Release files / pyaof-0.1.3.tar.gz

Download URL pyaof-0.1.3.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f2311a8a14c4727543d026bc892bfb194e1f7dfaf607042f89fdf2cbc94589c0
BLAKE2b-256 checksum
How to use checksums
09cb414044a95832a5ee23f86fb945cb82d66105ce373eb377483868de24ff19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / pyaof-0.1.3-py3-none-any.whl

Download URL pyaof-0.1.3-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
690b61173d1778b3b41ce374a8cdbd7443cd935a1200a4acb2491fe8e968dc20
BLAKE2b-256 checksum
How to use checksums
d55156655cd4045ed822e808297894942517561f9d879d4a4cd2d78192477f7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page