Draw a 3D centered cube, eventually rotated. drawCube(CUBE) Displays a 3D cube on current axis. CUBE is given by: [XC YC ZC SIDE THETA PHI PSI] where (XC, YC, ZC) is the CUBE center, SIDE is the length of the cube main sides, and THETA PHI PSI are angles representing the cube orientation, in degrees. THETA is the colatitude of the cube, between 0 and 90 degrees, PHI is the azimut, and PSI is the rotation angle around the axis of the normal. CUBE can be axis aligned, in this case it should only contain center and side information: CUBE = [XC YC ZC SIDE] The function drawCuboid is closely related, but uses a different angle convention, and allows for different sizes along directions. Example % Draw a cube with small rotations figure; hold on; drawCube([10 20 30 50 10 20 30], 'FaceColor', 'g'); axis equal; view(3); See also meshes3d, polyhedra, createCube, drawCuboid
Package: matgeom