[R] How to define and calculate volume of 3D polygon?

Alexander Shenkin ashenkin at ufl.edu
Mon May 19 16:42:53 CEST 2014


Hi Folks,

I have a set of x,y,z points in 3D space that defines the outline of a 
tree crown (5 - 15 perimeter points + 1 top & bottom point). I would 
like to calculate the volume of the corresponding 3D polygon based on 
those points.  I have been able to use geometry::convhulln, but I think 
this isn't the right algorithm, since the polygon needs to pass through 
each point in order, and not just snap a rubber-band around the outer 
points.

Any suggestions for alternative algorithms and packages would be most 
welcome!

Thanks,
Allie

    seq          x          y    z
1    1 -1.7310065  2.4502278 11.1
2    2 -1.9048260 -0.6096212  9.0
3    3  2.8652209  0.8891057 11.0
4    4  2.3929514 -3.4516349 11.2
5    5 -2.6436343  5.2745803 11.7
6    6 -4.3521504  4.6924180 11.7
7    7  6.1441732 -4.8051156 11.6
8    8 -6.2157823 -3.2193244  8.0
9    9  1.0024961 -2.8275434  9.0
10  10 -3.9656821  3.0452201  8.0
11  11  4.2070518 -1.5970958 11.0
12  12 -0.9461915  1.2902409  9.8
13  13  2.2792265  0.7517491 11.4



More information about the R-help mailing list