0
$\begingroup$

Looking at this file, what vectors do I need to add to the cube:={...} in order to get a full cube?enter image description here

$\endgroup$
2
  • 4
    $\begingroup$ Please, post code as code, not as pictures... $\endgroup$
    – ciao
    Commented Sep 28, 2015 at 4:45
  • 1
    $\begingroup$ Hint: Graphics3D[{FaceForm[None], Cuboid[{{-1, -1, -1}, {1, 1, 1}}]}, Boxed -> False, Axes -> True] $\endgroup$
    – ciao
    Commented Sep 28, 2015 at 6:41

1 Answer 1

1
$\begingroup$

The simplest way that comes to my mind is to substitute your list of vertices for the list of vertices used to draw the cube available through PolyhedronData. The code for doing that would be

Module[{
    cube = {{-1, -1, -1}, {-1, -1, 1}, {-1, 1, -1}, {-1, 1, 1}, 
            {1, -1, -1}, {1, -1, 1}, {1, 1, -1}, {1, 1, 1}},
    p = PolyhedronData["Cube", "Faces"]},
  p[[1]] = cube;
  Graphics3D[{FaceForm[None], p}, Boxed -> False]]

The result is a wire-frame cube with the vertices you specified.

cube

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.