Description Usage Arguments Value Note See Also Examples

The function `mba.points`

returns points on a surface
approximated from a bivariate scatter of points using multilevel B-splines.

1 2 | ```
mba.points(xyz, xy.est, n = 1, m = 1, h = 8, extend = TRUE,
verbose = TRUE, ...)
``` |

`xyz` |
a |

`xy.est` |
a |

`n` |
initial size of the spline space in the hierarchical construction along the x axis. If the rectangular domain is a square, n = m = 1 is recommended. If the x axis is k times the length of the y axis, n = 1, m = k is recommended. The default is n = 1. |

`m` |
initial size of the spline space in the hierarchical construction along the y axis. If the y axis is k times the length of the x axis, m = 1, n = k is recommended. The default is m = 1. |

`h` |
Number of levels in the hierarchical construction. If, e.g.,
n = m = 1 and h = 8, the resulting spline surface has a coefficient
grid of size |

`extend` |
if FALSE, points in |

`verbose` |
if TRUE, warning messages are printed to the screen. |

`...` |
currently no additional arguments. |

List with 1 component:

`xyz.est` |
a |

The function `mba.points`

relies on the Multilevel B-spline
Approximation (MBA) algorithm. The underlying code was developed at
SINTEF Applied Mathematics by Dr. <c3><98>yvind Hjelle. Dr. <c3><98>yvind Hjelle based the
algorithm on the paper by the originators of Multilevel B-splines:

S. Lee, G. Wolberg, and S. Y. Shin. (1997) Scattered data interpolation with multilevel B-splines. IEEE Transactions on Visualization and Computer Graphics, 3(3):229–244.

For additional documentation and references see:

www.sintef.no/upload/IKT/9011/geometri/MBA/mba_doc/index.html.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ```
data(LIDAR)
##split the LIDAR dataset into training and validation sets
tr <- sample(1:nrow(LIDAR),trunc(0.5*nrow(LIDAR)))
##look at how smoothing changes z-approximation,
##careful the number of B-spline surface coefficients
##increases at ~2^h in each direction
for(i in 1:10){
mba.pts <- mba.points(LIDAR[tr,], LIDAR[-tr,c("x","y")], h=i)$xyz.est
print(sum(abs(LIDAR[-tr,"z"]-mba.pts[,"z"]))/nrow(mba.pts))
}
## Not run:
##rgl or scatterplot3d libraries can be fun
library(rgl)
##exaggerate z a bit for effect and take a smaller subset of LIDAR
LIDAR[,"z"] <- 10*LIDAR[,"z"]
tr <- sample(1:nrow(LIDAR),trunc(0.99*nrow(LIDAR)))
##get the "true" surface
mba.int <- mba.surf(LIDAR[tr,], 100, 100, extend=TRUE)$xyz.est
open3d()
surface3d(mba.int$x, mba.int$y, mba.int$z)
##now the point estimates
mba.pts <- mba.points(LIDAR[tr,], LIDAR[-tr,c("x","y")])$xyz.est
spheres3d(mba.pts[,"x"], mba.pts[,"y"], mba.pts[,"z"],
radius=5, color="red")
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.