81_sample_functions: Sample Functions

Description Usage Arguments Details Value Examples

Description

Functions to produce sample scalar and vector fields.

Usage

1
2
3
4
5
6
7
#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.

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.

Value

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

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

Examples

1
2
3
4
rotated.sinc (0, 0)
bispherical.dist (0, 0, 0)
circular.field (0, 0)
plughole.field (0, 0, 0)

Example output

[1] 1
[1] 1.414214
     dx dy
[1,]  0  0
     dx           dy dz
[1,] -1 6.123234e-17 -1

barsurf documentation built on Jan. 20, 2021, 5:08 p.m.