# QHull and Polyhedra give different volume estimates

**URL:** <https://discourse.julialang.org/t/qhull-and-polyhedra-give-different-volume-estimates/74487>\
**Category:** General Usage\
**Tags:** optimization, geometry, polyhedra\
**Created:** [January 12, 2022, 1:33pm UTC](https://discourse.julialang.org/t/qhull-and-polyhedra-give-different-volume-estimates/74487 "2022-01-12T13:33:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [January 12, 2022, 1:33pm UTC](https://discourse.julialang.org/t/qhull-and-polyhedra-give-different-volume-estimates/74487/1 "2022-01-12T13:33:45Z")

</div>

I am trying to figure out why QHull and Polyhedra give different volume estimates for the same inputs. They agree in the 2D case, but diverge in the 3D case.

**Results**

```julia
2D
Polyhedra.jl: 0.982
QHull.jl: 0.982
3D
Polyhedra.jl: 4.987
QHull.jl: 0.932

```

**Code**

```julia
using QHull, Polyhedra

points1 = rand(1000, 2) 
ph1 = polyhedron(vrep(points1))

hull1 = chull(points1)

println("2D")
println("Polyhedra.jl: $(round(volume(ph1), digits=3))")
println("QHull.jl: $(round(hull1.volume, digits=3))")

points2 = rand(1000, 3) 
ph2 = polyhedron(vrep(points2))

hull2 = chull(points2)

println("3D")
println("Polyhedra.jl: $(round(volume(ph2), digits=3))")
println("QHull.jl: $(round(hull2.volume, digits=3))")

```
