Skip to main content

A collection of algorithms for iso-sufrace extraction on GPU. Supports pytorch.

Project description

isoext: Isosurface Extraction on GPU

PyPI version

Overview

Welcome to isoext — a Python library designed for efficient isosurface extraction, leveraging the power of GPU computing and comes with pytorch support. Our library attempts to implement a collection of classic isosurface extraction algorithms. Currently, only the following algorithms are supported, but more will come in the future:

Installation

To install isoext, make sure CUDA Toolkit is installed and run:

pip install isoext

Quick Start

Here's a simple example to get you started:

import isoext
from isoext.sdf import *

aabb = [-1, -1, -1, 1, 1, 1]
res = 128
grid = isoext.make_grid(aabb, res)

torus_a = TorusSDF(R=0.75, r=0.15)
torus_b = RotationOp(sdf=torus_a, axis=[1, 0, 0], angle=90)
torus_c = RotationOp(sdf=torus_a, axis=[0, 1, 0], angle=90)

sphere_a = SphereSDF(radius=0.75)

sdf = IntersectionOp([
    sphere_a, 
    NegationOp(UnionOp([
        torus_a, torus_b, torus_c
    ]))
])
sdf_v = sdf(grid) # Only accept a gpu tensor from pytorch for now

isolevel = 0

v, f = isoext.marching_cubes(sdf_v, aabb, isolevel)

isoext.write_obj('test.obj', v, f)

Task List

  • Fix docstring.
  • Implement MC33.
  • Add numpy support.

License

isoext is released under the MIT License. Feel free to use it in your projects.

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isoext-0.2.1.tar.gz (15.0 kB view details)

Uploaded Source

File details

Details for the file isoext-0.2.1.tar.gz.

File metadata

  • Download URL: isoext-0.2.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for isoext-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6ead051ae10787d5de51efffd8025491ec154279e24a88503d71250dfb0f676d
MD5 1effd3fee49a3d08098d4f46ebaec568
BLAKE2b-256 c7803c6d8e70b57cd863a6edadde0dee03c43501938d05581a25e3f74a3fa2bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page