Is there a way to create a rectangular prism in R rgl similar to the cube3d function? I can always combine many cubes to make a rectangular prism, but are there some ready made functions for it?
You can change the matrix supplied to it, for example:
rectmat <- identityMatrix()*c(1,2)
rect <- cube3d(rectmat)
plot3d(rect)