Edit and compile if you like:
\documentclass{article}\usepackage{tikz}\usepackage{tikz-3dplot}\usepackage[active,tightpage]{preview}\PreviewEnvironment{tikzpicture}\setlength\PreviewBorder{0.125pt}%% File name: truncated-cube.tex% Description:% A geometric representation of truncated cube is shown.%% Date of creation: June, 19th, 2021.% Date of last modification: October, 9th, 2022.% Author: Efraín Soto Apolinar.% https://www.aprendematematicas.org.mx/author/efrain-soto-apolinar/instructing-courses/% Source: page 84 of the% Glosario Ilustrado de Matem\'aticas Escolares.% https://tinyurl.com/5udm2ufy%% Terms of use:% According to TikZ.net% https://creativecommons.org/licenses/by-nc-sa/4.0/% Your commitment to the terms of use is greatly appreciated.%\begin{document}\tdplotsetmaincoords{80}{115}%\begin{tikzpicture}[tdplot_main_coords]% Change the value of the number at {\escala}{##} to scale the figure up or down\pgfmathsetmacro{\escala}{1.25}\pgfmathsetmacro{\a}{\escala*(0.5+1.0/sqrt(2.0))}\pgfmathsetmacro{\b}{\escala*1.0/(2.0-2.0*sqrt(2.0))}% Coordinates of the vertices\coordinate(1) at (-0.5*\escala,\a,\a);\coordinate(2) at (-0.5*\escala,\a,\b);\coordinate(3) at (-0.5*\escala,\b,\a);\coordinate(4) at (-0.5*\escala,\b,\b);\coordinate(5) at (0.5*\escala,\a,\a);\coordinate(6) at (0.5*\escala,\a,\b);\coordinate(7) at (0.5*\escala,\b,\a);\coordinate(8) at (0.5*\escala,\b,\b);
Click to download: truncated-cube.tex • truncated-cube.pdf
Open in Overleaf: truncated-cube.tex
See more on the author page of Efraín Soto Apolinar.