I am trying to fill a rotated convex polyhedron with points. This functions well in the unrotated case:
pts = Flatten[Table[{x, y, z}, {x, -2, 2, 0.1}, {y, -2, 2, 0.1}, {z, -2, 2, 0.1}], 2];
inside = Select[pts,Apply@PolyhedronData["Dodecahedron","RegionFunction"]];
Graphics3D[{Sphere[inside, 0.1]}, Axes -> True, AxesLabel -> {"x", "y", "z"}, Ticks -> {{-2, 2}, {-2, 2}, {-2, 2}}]
Now, I would like to do the same but with a previously rotated polyhedron as it can be displayed with:
Graphics3D[
GeometricTransformation[{PolyhedronData["Dodecahedron",
"GraphicsComplex"]}, RotationMatrix[-36 Degree, {0, 0, 1}]],
Axes -> True, AxesLabel -> {"x", "y", "z"},
Ticks -> {{-2, 2}, {-2, 2}, {-2, 2}}]
So far, I have tried using GeometricTransformation
and Rotate
on PolyhedronData["Cuboctahedron"]
, which didn't work out.