square2H {jacobi}R Documentation

Square to upper half-plane

Description

Conformal map from the unit square to the upper half-plane. The function is vectorized.

Usage

square2H(z)

Arguments

z

a complex number in the unit square [0,1] \times [0,1]

Value

A complex number in the upper half-plane.

Examples

n <- 1024L
x <- y <- seq(0.0001, 0.9999, length.out = n)
Grid <- transform(
  expand.grid(X = x, Y = y), 
  Z = complex(real = X, imaginary = Y)
)
K <- kleinj(square2H(Grid$Z))
dim(K) <- c(n, n)
# plot
if(require("RcppColors")) {
  img <- colorMap5(K)
} else {
  img <- as.raster((Arg(K) + pi)/(2*pi))
}
opar <- par(mar = c(0, 0, 0, 0))
plot(NULL, xlim = c(0, 1), ylim = c(0, 1), asp = 1, 
     axes = FALSE, xaxs = "i", yaxs = "i", xlab = NA, ylab = NA)
rasterImage(img, 0, 0, 1, 1)
par(opar)

[Package jacobi version 3.1.1 Index]