Parallelepiped

Author

Eric W. Weisstein
December 15, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SolidGeometry/Parallelepiped.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Parallelepiped.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

Parallelepiped[a_,b_,c_]:=Module[{z={0,0,0}},
Polygon/@{{z,a,a+b,b},{z,a,a+c,c},{z,b,b+c,c},c+#&/@{z,a,a+b,b},b+#&/@{z,a,a+c,c},a+#&/@{z,b,b+c,c}}
]

Figure

v={{1,0,0},{1,1,0}/2,{1,1,1}.7};
g=Show[Graphics3D[{
Parallelepiped@@v,
{Red,Thickness[.01],Line[{{0,0,0},#}]&/@v}
}],
AspectRatio->Automatic,Boxed->False
]

LiveGraphics3D

<<Utilities`LiveGraphics3D`

WriteLiveForm["paralelp.m",g]