Skip to content

Commit 38ef674

Browse files
committed
update README
1 parent 44741d7 commit 38ef674

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,38 @@
33
[![Build Status](https://travis-ci.org/JuliaGeometry/Meshing.jl.svg)](https://travis-ci.org/JuliaGeometry/Meshing.jl)
44
[![codecov.io](http://codecov.io/github/JuliaGeometry/Meshing.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaGeometry/Meshing.jl?branch=master)
55

6-
This package provides meshing algorithms for use on distance fields.
6+
This package provides a comprehensive suite of meshing algorithms for use on distance fields.
77

8-
Including:
8+
Algorithms included:
99
* [Marching Tetrahedra](https://en.wikipedia.org/wiki/Marching_tetrahedra)
1010
* [Marching Cubes](https://en.wikipedia.org/wiki/Marching_cubes)
1111
* [Naive Surface Nets](https://0fps.net/2012/07/12/smooth-voxel-terrain-part-2/)
1212

1313
## Interface
1414

15-
This package is tightly integrated with [GeometryTypes.jl](https://github.com/JuliaGeometry/GeometryTypes.jl).
15+
This package inherits the [mesh types](http://juliageometry.github.io/GeometryTypes.jl/latest/types.html#Meshes-1)
16+
from [GeometryTypes.jl](https://github.com/JuliaGeometry/GeometryTypes.jl).
1617

17-
All algorithms operate on `SignedDistanceField` and output a concrete `AbstractMesh`. For example:
18+
The algorithms operate on a `Function` or a `SignedDistanceField` and output a concrete `AbstractMesh`. For example:
1819

1920
```
2021
using Meshing
2122
using GeometryTypes
2223
using LinearAlgebra: dot, norm
2324
using FileIO
2425
25-
# generate an SDF of a sphere
26-
sdf_sphere = SignedDistanceField(HyperRectangle(Vec(-1,-1,-1.),Vec(2,2,2.))) do v
27-
sqrt(sum(dot(v,v))) - 1 # sphere
26+
# Mesh an equation of sphere in the Axis-Aligned Bounding box starting
27+
# at -1,-1,-1 and widths of 2,2,2
28+
m = GLNormalMesh(HyperRectangle(Vec(-1,-1,-1.), Vec(2,2,2.)), MarchingCubes()) do v
29+
sqrt(sum(dot(v,v))) - 1
2830
end
2931
30-
m = GLNormalMesh(sdf_sphere, MarchingCubes())
31-
32+
# save the Sphere as a PLY file
3233
save("sphere.ply",m)
3334
```
3435

35-
The general API is ``(::Type{MT})(sdf::SignedDistanceField, method::AbstractMeshingAlgorithm) where {MT <: AbstractMesh}``
36+
The general API is: ```(::Type{MT})(sdf::Function, method::AbstractMeshingAlgorithm) where {MT <: AbstractMesh}``` or ```(::Type{MT})(sdf::SignedDistanceField, method::AbstractMeshingAlgorithm) where {MT <: AbstractMesh}```
37+
3638

3739
For a full listing of concrete `AbstractMesh` types see [GeometryTypes.jl mesh documentation](http://juliageometry.github.io/GeometryTypes.jl/latest/types.html#Meshes-1).
3840

0 commit comments

Comments
 (0)