MATLAB: How to alter Z axis (incorporate twist) into a stacked 2D voxel plot

voxels

when extruding a 2D voxel plane is there a function similar to repmat but instead of just adding a direct copy on top, it also adds a twist to the layers like 1 degree per level and if you have 360 layers the design will do a full revolution.

Best Answer

No, there is no function like that.
How would you want to deal with the fact that the rotated copies take up more x/y space than the originals?
For example if you had the original
+++++++++++++
+
which is 2 x 13, then a 90 degree rotation around the center would be 13 x 2, which is never going to fit in a 2 x 13 array.