Learn R Programming

barsurf (version 0.7.0)

81_sample_functions: Sample Functions

Description

Functions to produce sample scalar and vector fields.

Usage

#scalar-valued (theoretically)
rotated.sinc (x, y)
bispherical.dist (x, y, z)

#vector-valued (theoretically) circular.field (x, y) plughole.field (x, y, z)

Arguments

x, y, z

Numeric vectors, where the functions are evaluated.

Value

The (theoretically) scalar-valued functions, return a numeric vector.

The (theoretically) vector-valued functions, return a two-column or three-column matrix.

Details

The rotated.sinc function was adapted from the graphics::persp examples.

The bispherical.dist function gives the smaller of distances from two points at: (-1, 1, 0) (1, -1, 0)

The circular.field function generates a vector field with circular flow, and highest magnitude at r=1, where r is the distance from the origin.

Examples

Run this code
# NOT RUN {
rotated.sinc (0, 0)
bispherical.dist (0, 0, 0)
circular.field (0, 0)
plughole.field (0, 0, 0)
# }

Run the code above in your browser using DataLab