matlab - Draw a truncated rectangular pyramid -
how can draw truncated rectangular pyramid in matlab ? base , top rectangles should have 4:3 aspect ratio. image shown guideline. ability through funnel nice. >> x = [0 0 0 0; 1 1 -1 1; 1 -1 -1 -1]; y = [0 0 0 0; 5 5 5 5; 5 5 5 5]; z = [0 0 0 0; 1 1 -1 -1; -1 1 1 -1]; fill3(x,y,z, ones(3,4)) this achieves pyramid now need adjustments cut peak. x =[ 3/4 -3/4 -3/4 -3/4; 3/4 3/4 -3/4 3/4; 3 3 -3 3; 3 -3 -3 -3]; y =[ 5/2 5/2 5/2 5/2; 5/2 5/2 5/2 5/2; 5 5 5 5; 5 5 5 5]; z =[-4/2 4/2 4/2 -4/2; 4/2 4/2 -4/2 -4/2; 4 4 -4 -4; -4 4 4 -4]; fill3(x,y,z, ones(4,4)) grid this create truncated square pyramid 4:3 aspect ratio @ base.