# NOT RUN {
# Take a simple HIP lattice for illustration
# nboxes = 2^3 * 3^2 = 72
lat1 <- hip.lattice.polygon(box = matrix(data = c(0,1,0,1), nrow = 2, byrow = TRUE),
J = c(3,2),
bases = c(2,3))
# legth lat1, should be 72
length(lat1)
# prep points for plotting
trans <- list()
i=1
for(mat in lat1) {
trans[[i]] <- t(mat)
i=i+1
}
# plot points
plot(c(0,1),c(0,1))
for(mat in trans) {
points(mat[1,1],mat[1,2])
points(mat[2,1],mat[2,2])
}
# }
Run the code above in your browser using DataLab