How can I plot a truncated cube with size (sqrt(2)-1)? The code I am using is simply
PolyhedronData["TruncatedCube"]
In case size means length of each edge:
edgeLength = PolyhedronData["TruncatedCube", "EdgeLengths"][[1]];
Graphics3D[
GeometricTransformation[
First @ PolyhedronData["TruncatedCube"],
ScalingTransform[{1, 1, 1} (Sqrt[2] - 1)/edgeLength]
]
,
Axes -> True
]
GeometricTransformation[]
: Graphics3D[ MapAt[# (Sqrt[2] - 1)/edgeLength &, PolyhedronData["TruncatedCube", "Faces"], 1], Axes -> True]
$\endgroup$
Commented
Jun 2, 2016 at 10:26
Scale
too. p.s. Why do you prefer to avoid GeometricTransformation
?
$\endgroup$
sqrt(2)-1
?
$\endgroup$
Scale[]
is like GeometricTransformation[]
too; in my usual applications, I often apply replacement rules to the coordinates, and GeometricTransformation[]
does not often play nice with such replacements. Another point against it for me is that DiscretizeGraphics[]
and BoundaryDiscretizeGraphics[]
do not (currently) work with GeometricTransformation[]
objects.
$\endgroup$
Commented
Jun 2, 2016 at 10:33