# random distribution vectors on cube edges

How can I put randomly eight vectors with length b into eight edges of a cube with side of a and specify them with their orientation relative to original frame. Suitable way is showing them by

d[1]={bcos[thetax[1]]i+bcos[thetay[1]]j+bcos[thetaz[1]]k}
d[2]={bcos[thetax[2]]i+bcos[thetay[2]]j+bcos[thetaz[2]]k}
.
.
.


i,j,k are unit vector in x,y,z directions and thetax,thetay and thetaz are relative angles of vectors to x,y,z axis respectively.

In this naming I am able to apply the main goal containing vector manipulations.

• What do you want to do with those vectors? Further calculations? Display them only? – MarcoB Sep 12 '15 at 15:56

For view I would suggest the following:

b = 1;
a = 2;
cor = Tuples[{0, a}, 3];
arrwos = {#1 - #2, #1 + #2} & @@@
Transpose[{cor, b/2 Normalize /@ RandomReal[{-1, 1}, {8, 3}]}];
Graphics3D[{{Opacity[0],
Cuboid[{0, 0, 0}, {a, a, a}]}, {PointSize[0.02], Red, Point[cor]},
Arrow /@ arrwos}, Boxed -> False, Axes -> True,
AxesOrigin -> {0, 0, 0}]


• Wonderful and great. – Unbelievable Sep 13 '15 at 3:38