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