Comments (3)
What ended up being the problem @empet? If there's anything that was maybe unclear in the documentation for example that could be good for me to fix up.
from delaunaytriangulation.jl.
The docs are very good, but in an attempt to reproduce a surface triangulation I worked on a few years ago, with Delaunay.jl
I made the following mistake:
The surface (x,y) ->f(x,y)
was defined on the planar disk, D(0,2). Hence I started with:
r = collect(0.0:0.1:2)
θ = collect(0:π/30:2π)
x = vec(r * cos.(θ)')
y = vec(r * sin.(θ)')
z = f.(x, y)
pts=[[xe, ye] for (xe, ye) in zip(x,y)]
tri=triangulate(pts)
but got:
AssertionError: Duplicate points are not allowed.
Delaunay.jl
as well as scipy.spatial.Delaunay
work very well with non-unique points.
I replaced pts
by unique(pts)
and continued to transcribe the triangulation code for the former package, in terms of DelaunayTraingulation
. But I plotted the triangulated surface using tri.triangles
, and the points onto the surface corresponding to initial, non-unique pts
, and obviuosly I got an ugly, non-smooth surface. When I clicked to send the formulated issue, I realized what was wrong.
So I started with r=collect(0.05:0.1, 2)
, that led to unique pts
and the triangulated surface was perfect. :)
Final conclusion: DelaunayTrisngulation.jl
is great!
from delaunaytriangulation.jl.
I see - yes duplicate points can be a bit of a hassle to handle, so I don't try and resolve it internally as is done in scipy.spatial.Delaunay (and hence Delaunay.jl). unique!
might've saved you some trouble here too since it would just update pts
inplace.
I had initially implemented it so that if duplicated points were detected, triangulate
was re-called with skip_points
set to be the points that were detected as duplicates, but I ended up deciding to leave it to the user to resolve these degeneracies rather than handling it within the package. Proceeding with them in the algorithm is also not good since it can cause some infinite loops.
Thanks for letting me know about the solution! Appreciate the feedback too :).
from delaunaytriangulation.jl.
Related Issues (20)
- Error precompiling due to missing method for ExactPredicates v2.2.5, with Julia 1.8.0 and DelaunayTriangulation v0.7.1 HOT 3
- Add better default methods for interface methods
- Goals for 1.0 HOT 1
- A problem when installing DelaunayTriangulation HOT 2
- Move MakieCore code into Makie.jl
- vertex iterators not updated with `delete_boundary_vertices_from_graph!`
- Integer division error with Float32 for clipped Voronoi HOT 7
- All coordinates should be internally converted to Float64
- Use Graphs.jl instead of SimpleGraphs.jl
- Voronoi treemap HOT 2
- UndefVarError: `triplot` not defined HOT 10
- Infinite loop due to zero-area triangle but positive oriented according to ExactPredicates.jl
- delete_point! fails for link with concave triangular-indent
- Document -1 HOT 1
- Delete_point HOT 3
- Added points which are on the boundary are added to the constrained segments HOT 5
- Fix doc image in curve-bounded domains tutorial
- Invalid `convex_hull` when points are repeated HOT 5
- Add an alias `find_triangle` for `jump_and_march`
- Performance audit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delaunaytriangulation.jl.