* would need to figure out domain of input points (defined by a single template?) * also would be best to optimise the points (spreading them out, selecting a subset whose removal has least impact on error) * there are also schemes for optimising fwd/inverse consistency for tps ``` sample_points_in_surf <- function(x, n){ x=as.mesh3d(x) bb=boundingbox(x) mm=mapply(runif, min=bb[1,], max=bb[2,], n = n) colnames(mm)=c("X","Y","Z") data.frame(mm, inside=pointsinside(mm,x)) } ```