franke.data: Test datasets from Franke for interpolation of scattered data

View source: R/franke.R

franke.dataR Documentation

Test datasets from Franke for interpolation of scattered data

Description

franke.data generates the test datasets from Franke, 1979, see references.

Usage

franke.data(fn = 1, ds = 1, data)
franke.fn(x, y, fn = 1)

Arguments

fn

function number, from 1 to 5.

x

'x' value

y

'y' value

ds

data set number, from 1 to 3. Dataset 1 consists of 100 points, dataset 2 of 33 points and dataset 3 of 25 points scattered in the square [0,1]\times[0,1]. (and partially slightly outside).

data

A list of dataframes with 'x' and 'y' to choose from, dataset franke should be used here.

Details

These datasets are mentioned in Akima, (1996) as a testbed for the irregular scattered data interpolator.

Franke used the five functions:

0.75e^{-\frac{(9x-2)^2+(9y-2)^2}{4}}+ 0.75e^{-\frac{(9x+1)^2}{49}-\frac{9y+1}{10}}+ 0.5e^{-\frac{(9x-7)^2+(9y-3)^2}{4}}- 0.2e^{-((9x-4)^2-(9y-7)^2)}

\frac{\mbox{tanh}(9y-9x)+1}{9}

\frac{1.25+\cos(5.4y)}{6(1+(3x-1)^2)}

e^{-\frac{81((x-0.5)^2+\frac{(y-0.5)^2}{16})}{3}}

e^{-\frac{81((x-0.5)^2+\frac{(y-0.5)^2}{4})}{3}}

\frac{\sqrt{64-81((x-0.5)^2+(y-0.5)^2)}}{9}-0.5

and evaluated them on different more or less dense grids over [0,1]\times[0,1].

Value

A data frame with components

x

'x' coordinate

y

'y' coordinate

z

'z' value

Note

The datasets have to be generated via franke.data before use, the dataset franke only contains a list of 3 dataframes of 'x' and 'y' coordinates for the above mentioned irregular grids. Do not forget to load the franke dataset first.

The 'x' and 'y' values have been taken from Akima (1996).

Author(s)

Albrecht Gebhardt <albrecht.gebhardt@aau.at>, Roger Bivand <roger.bivand@nhh.no>

References

FRANKE, R., (1979). A critical comparison of some methods for interpolation of scattered data. Tech. Rep. NPS-53-79-003, Dept. of Mathematics, Naval Postgraduate School, Monterey, Calif.

Akima, H. (1996). Algorithm 761: scattered-data surface fitting that has the accuracy of a cubic polynomial. ACM Transactions on Mathematical Software 22, 362–371.

See Also

interp

Examples

## generate Frankes data set for function 2 and dataset 3:
data(franke)
F23 <- franke.data(2,3,franke)
str(F23)

interp documentation built on Nov. 28, 2023, 1:07 a.m.