this function defines a 3-dimensional array with given dimensions and sets all elements to 1 except those with element indices given by x and y, which are set to zero

load_jpeg(x, y, siz = 64, dim = c(64, 64, 3))

Arguments

x

indices in first dimension of array

y

indices in second dimension of array

siz

numeric side length

dim

numeric(3) dimensions of array to be filled

Examples

ntri = maketri()
jp = load_jpeg(ntri$x, ntri$y)
plot(0,0,type="n",xlim=c(0,1), ylim=c(0,1))
graphics::rasterImage(jp, 0, 0, 1, 1, interpolate=FALSE)