1 | TriList_Fn(mesh)
|
mesh |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (mesh)
{
TV = mesh$graph$tv
V0 = mesh$loc[TV[, 1], 1:2]
V1 = mesh$loc[TV[, 2], 1:2]
V2 = mesh$loc[TV[, 3], 1:2]
E0 = V2 - V1
E1 = V0 - V2
E2 = V1 - V0
Tri_Area = rep(NA, n_r)
for (i in 1:length(Tri_Area)) Tri_Area[i] = abs(crossprod_fn(E0[i,
], E1[i, ]))/2
TriList = list(TV = TV, V0 = V0, V1 = V1, V2 = V2, E0 = E0,
E1 = E1, E2 = E2, Tri_Area = Tri_Area)
return(TriList)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.