9
$\begingroup$

I'm a bit new to the application, and I'm not sure how to draw a parallelepiped in Mathematica.

$\endgroup$
0

1 Answer 1

13
$\begingroup$

After version 9: Parallelepiped.

Graphics3D[Parallelepiped[{0, 0, 0}, {{1, 0, 0}, {1, 1, 0}, {0, 1, 1}}]] 

enter image description here


Version 9 or before. Right from the documentation of ShearingMatrix, that is a GeometricTransformation:

Graphics3D[{GeometricTransformation[{Opacity[.85], Red, Cuboid[]}, ShearingMatrix[Pi/4, {1, 0, 0}, {-1, 1, 0}]]}, Boxed -> False] 

Mathematica graphics

A dynamic manipulator to understand arguments:

Manipulate[ Graphics3D[{ GeometricTransformation[{Opacity[.85], Red, Cuboid[]}, ShearingMatrix[a, dir, {x, y, z}]] }, FaceGrids -> {{-1, 0, 0}, {0, 1, 0}, {0, 0, -1}}, Axes -> True, Boxed -> False, BoxRatios -> 1, SphericalRegion -> True], {{a, Pi/4}, -Pi/2, Pi/2, Appearance -> "Labeled"}, {{dir, {0, 1, 0}, "direction"}, {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}}, {{x, -1}, -1, 1, .1, Appearance -> "Labeled"}, {{y, 1}, -1, 1, .1, Appearance -> "Labeled"}, {{z, 0}, -1, 1, .1, Appearance -> "Labeled"}, ControlPlacement -> Left ] 

Mathematica graphics

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.