set.seed(123) n = 200 nmod = 5 mat = matrix(0, n, n) mat[1:nmod, 1:nmod] = rnorm(nmod^2) + 1i * rnorm(nmod^2) imat = Re(fft(mat, inverse=TRUE)) image(imat, axes=FALSE)
library(tidyverse) library(ggvoronoi) # install_github("garretrc/ggvoronoi")
set.seed(123) n = 200 dat = tibble(x = runif(n), y=runif(n), z=sin(pi*x)*y) ggplot(dat) + geom_voronoi(aes(x=x, y=y, fill=z), show.legend=FALSE) + scale_fill_viridis_c() + theme_void()