crude approach to a random rectangle in 32x32 rectangle, can bleed over

ranbox(...)

Examples

set.seed(2345)
plot(0,0,type="n", xlim=c(1,32), ylim=c(1,32))
for (i in seq_len(30)) { lines(ranbox()) }