getTVol | R Documentation |
Computes the signed volume of a tetrahedron defined by the 3D coordinates of a triangle (i.e. triangle vertices + origin as vertex)
getTVol(coords)
coords |
a vector of concatenated xyz coordinates. Note that only the first 9 values will be used. |
numeric value of the computed volume or NA in case of bad input
this function is currently too slow - 100k calls are processed in ~5.2 seconds.
# input format: c(x,y,z,x1,y1,z1,x2,y2,z2)
triangle <- c(-2,0,5,-10,-2,-1,1,0,0)
Lithics3D:::getTVol(triangle)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.