R/maketri.R
load_jpeg.Rd
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))
indices in first dimension of array
indices in second dimension of array
numeric side length
numeric(3) dimensions of array to be filled
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)