# Truncated pyramid in Mathematica

Consider a truncated pyramid bounded by two rectangles:

Rectangle[{-100, -125}, {100, 125}]
Rectangle[{-200, -250}, {200, 250}]


The first rectangle is located at z = -1948 and the other one is at z = 2578.

Is it possible to plot this figure using Graphics3D?

Arbitrarily assuming two heights:

h1 = 0;
h2 = 100;

pts = {{-200, -250, h1}, {-200, 250, h1}, {200, 250, h1}, {200, -250,
h1},
{-100, -150, h2}, {-100, 150, h2}, {100, 150, h2}, {100, -150, h2}
};
polyh = ConvexHullRegion[pts]

Graphics3D[{polyh
}
, BoxRatios -> {1, 1, 1}
, Axes -> Automatic
]


EDIT

To have non-colored sides use Glow and adjust Opacity as desired:

Graphics3D[{
Glow[White]
, Opacity[0.5]
, polyh
}
, BoxRatios -> {1, 1, 1}
, Axes -> Automatic
]


EDIT 2

Using Region functionality:

p1 = Pyramid[{{-200, -250, h1}, {-200, 250, h1}, {200, 250,
h1}, {200, -250, h1}, {0, 0, 200}}]

RegionQ /@ {p1, Cuboid[{-200, -250, h1}, {200, 250, h2}]}


{True, True}

Region[Style[
RegionIntersection[p1, Cuboid[{-200, -250, h1}, {200, 250, h2}]],
Darker@Cyan]
, BoxRatios -> {1, 1, 1}, Boxed -> True, Axes -> True]


• Thanks! Is it also possible to not fill the sides of this figure with colors? Commented May 6, 2022 at 8:24
– Syed
Commented May 6, 2022 at 8:36
• Thanks again. Which version of Mathematica you are using? In my version of Mathematica (12.1), ConvexHullRegion is not defined. Commented May 6, 2022 at 8:49
• "12.2.0 for Microsoft Windows (64-bit) (December 12, 2020)" on Win7-x64.
– Syed
Commented May 6, 2022 at 8:50