Projecting a hypercube into 2D

Cube

Create all the points at the corners of a cube:

cubePoints=Flatten[Table[{i,j,k},{i,0,1},{j,0,1},{k,0,1}],2]

Create all ordered pairs of these points.

Flatten[Table[{cubePoints[[i]],cubePoints[[j]]},{i,1,Length[cubePoints]},{j,1,Length[cubePoints]}],1]

Find out which ones have unit length:

allSegs=Flatten[Table[{cubePoints[[i]],cubePoints[[j]]},{i,1,Length[cubePoints]},{j,1,Length[cubePoints]}],1];
segList=Select[allSegs,(#[[1]] - #[[2]]).(#[[1]] - #[[2]])==1&];

Plot them:

Graphics3D[Table[Line[segList[[i]]],{i,1,Length[segList]}]]

Try rotating them:

rotMat=RotationMatrix[π/7,{0,0,1}];

segsRot=Table[{rotMat.segList[[i,1]],rotMat.segList[[i,2]]},{i,1,Length[segList]}];
Graphics3D[Table[Line[segsRot[[i]]],{i,1,Length[segsRot]}]]

Dynamically manipulate them:

Manipulate[segsRot=Table[{RotationMatrix[{{1,0,0},{1,a,b}}].segList[[i,1]],RotationMatrix[{{1,0,0},{1,a,b}}].segList[[i,2]]},{i,1,Length[segList]}];
projSegsRot=Table[{Take[segsRot[[i,1]],2],Take[segsRot[[i,2]],2]},{i,1,Length[segsRot]}];
Graphics[Table[Line[projSegsRot[[i]]],{i,1,Length[projSegsRot]}],Frame-> False,PlotRange-> {{-1,2},{-1,2}}],{a,-1,1},{b,-1,1}]

HyperCube

hcubePoints=Flatten[Table[{i,j,k,l},{i,0,1},{j,0,1},{k,0,1},{l,0,1}],3]

Flatten[Table[{hcubePoints[[i]],hcubePoints[[j]]},{i,1,Length[hcubePoints]},{j,1,Length[hcubePoints]}],1];

allHyperSegs=Flatten[Table[{hcubePoints[[i]],hcubePoints[[j]]},{i,1,Length[hcubePoints]},{j,1,Length[hcubePoints]}],1];
hyperSegList=Select[allHyperSegs,(#[[1]] - #[[2]]).(#[[1]] - #[[2]])==1&];

hyperRotMat=RotationMatrix[{{0,0,0,1},{1,1,1,1}}];
hyperSegsRot=Table[{hyperRotMat.hyperSegList[[i,1]],hyperRotMat.hyperSegList[[i,2]]},{i,1,Length[hyperSegList]}];
projHyperSegsRot=Table[{Take[hyperSegsRot[[i,1]],3],Take[hyperSegsRot[[i,2]],3]},{i,1,Length[hyperSegsRot]}];
Graphics3D[Table[Line[projHyperSegsRot[[i]]],{i,1,Length[projHyperSegsRot]}],Boxed-> False]

Manipulate[hyperSegsRot=Table[{RotationMatrix[{{1,0,0,0},{1,a,b,c}}].hyperSegList[[i,1]],RotationMatrix[{{1,0,0,0},{1,a,b,c}}].hyperSegList[[i,2]]},{i,1,Length[hyperSegList]}];
projHyperSegsRot=Table[{Take[hyperSegsRot[[i,1]],3],Take[hyperSegsRot[[i,2]],3]},{i,1,Length[hyperSegsRot]}];
Graphics3D[Table[Line[projHyperSegsRot[[i]]],{i,1,Length[projHyperSegsRot]}],Boxed-> False,PlotRange-> {{-1,2},{-1,2},{-1,2}}],{a,-1,1},{b,-1,1},{c,-1,1}]