Reputation: 147
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?
Upvotes: 1
Views: 224
Reputation: 15405
You can change the matrix supplied to it, for example:
rectmat <- identityMatrix()*c(1,2)
rect <- cube3d(rectmat)
plot3d(rect)
Upvotes: 1