Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilliams authored Sep 2, 2021
1 parent a756292 commit eab8fa2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- Compute closest points on a mesh to a point cloud
- Deduplicating point clouds and mesh vertices
- Mesh smoothing
- Making a mesh watertight (based on the [Watertight Manifold](https://github.com/hjwdzh/Manifold) algorithm)
![Example of Poisson Disk Sampling](/img/blue_noise.png?raw=true "Example of Poisson Disk Sampling")

# Installation Instructions
Expand Down Expand Up @@ -59,6 +60,7 @@ The following dependencies are required to install with `pip`:
- [Compute closest points on a mesh](#compute-closest-points-on-a-mesh)
- [Deduplicating point clouds and meshes](#deduplicating-point-clouds-and-meshes)
- [Smoothing a mesh](#smoothing-a-mesh)
- [Making a mesh watertight](#making-a-mesh-watertight)


### Loading meshes and point clouds
Expand Down Expand Up @@ -558,3 +560,18 @@ use_cotan_weights = True # Whether to use cotangent weighted laplacian
# vsmooth contains the vertices of the smoothed mesh (the new mesh has the same face indices f)
vsmooth = pcu.laplacian_smooth_mesh(v, f, num_iters, use_cotan_weights=use_cotan_weights)
```


### Making a Mesh Watertight
```python
import point_cloud_utils as pcu

# v is a nv by 3 NumPy array of vertices
# f is an nf by 3 NumPy array of face indexes into v
v, f = pcu.load_mesh_vf("my_model.ply")

# Optional resolution parameter (default is 20_000).
# See https://github.com/hjwdzh/Manifold for details
resolution = 20_000
v_watertight, f_watertight = pcu.make_mesh_watertight(v, f, resolution=resolution)
```

0 comments on commit eab8fa2

Please sign in to comment.