You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> tri =delaunay(rand(2, 100));
julia> f =Figure()
julia>wireframe!(Axis(f[1,1]), GeometryBasics.Mesh(tri))
julia>linesegments!(Axis(f[1,2]), voronoi_edge_points(tri), color=:red)
Qhull Comparison
Quickhull.jl is competitive with Qhull's performance even
when exact arithmetic is used, although it has fewer features.
Robustness
quickhull can be run with various hyperplane kernels. A hyperplane
kernel is a method of calculating hyperplane-point distances. By default,
an exact kernel is used (i.e. the sign of the distance is always correct)
to ensure robustness. Robustness can be traded for speed by choosing an inexact
kernel, for instance:
It should be noted that if an inexact kernel is used – particularly
on inputs with coplanar or nearly coplanar points – the topology of the
hull can become corrupted, and an error will probably occur.
Parallelism
quickhull can be run with multithreading by setting the subdivide
option to Quickhull.ParallelSubdivide(), or using the shorthand
quickhull_parallel. In some cases this can achieve a speedup almost
linear in the number of threads.
julia> Threads.nthreads()
8
julia> pts =rand(3, 2_000_000);
julia>@btimequickhull($pts);
141.327 ms (2331 allocations:25.96 MiB)
julia>@btimequickhull_parallel($pts);
23.656 ms (14629 allocations:29.39 MiB)