View Perfect Parallelepipeds 1 and 5

by Jorge Sawyer and Cliff Reiter

The 1st Example with max Edge length 271

len2[X_]:=Factor[X.X]

len[X_]:=Sqrt[len2[X]]

lena[u_,v_,w_]:={{"u",len[u]},{"v",len[v]},{"w",len[w]},
				{"u+v",len[u+v]},{"u-v",len[u-v]},{"u+w",len[u+w]},{"u-w",len[u-w]},{"v+w",len[v+w]},{"v-w",len[v-w]},
{"u+v+w",len[u+v+w]},{"u+v-w",len[u+v-w]},{"u-v+w",len[u-v+w]},{"u-v-w",len[u-v-w]}}

Assemble[x1_,x2_,x3_,d23_,d13_,d12_]:=Block[{rho,c23,c13,c12,u,v,w},
c12=(x1^2+x2^2-d12^2)/(2 x1 x2);
c13=(x1^2+x3^2-d13^2)/(2 x1 x3);
c23=(x2^2+x3^2-d23^2)/(2 x2 x3);
rho=(c23-c12 c13)/(Sqrt[1-c12^2]Sqrt[1-c13^2]);
u=x1{1,0,0};
v=x2{c12,Sqrt[1-c12^2],0};
w=x3{c13,rho Sqrt[1-c13^2],Sqrt[1-rho^2]Sqrt[1-c13^2]};
{u,v,w}]

showpp[x1_,x2_,x3_,d23_,d13_,d12_]:=Block[{e12,e23,e13,m1,m2,m3,m4,t,o},
{u,v,w}=Assemble[x1,x2,x3,d23,d13,d12];
{t,t,t,e12,t,e13,t,e23,t,m4,m3,m2,m1}=Last[Transpose[lena[u,v,w]]];
o={0,0,0};
Show[Graphics3D[{Thickness[0.02],
Red,Text[ToString[x1],u/2-v /5],Line[{o,u}],Line[{v,u+v}],Line[{w+o,w+u}],Line[{w+v+o,w+v+u}],
Green,Text[ToString[x2],v/2-u /15],Line[{o,v}],Line[{u,u+v}],Line[{w+o,w+v}],Line[{w+u+o,w+v+u}],
Blue,Text[ToString[x3],w/2-u /15],Line[{o,w}],Line[{v,w+v}],Line[{u+o,w+u}],Line[{u+v+o,w+v+u}],
Thickness[0.01],
Cyan,Line[{u,v}],Text[ToString[d12],u+1/4(-u+v)-v /10],
Dotted,Line[{o,u+v}],
Text[ToString[e12],1/4(u+v)-v/10],
Dashing[{}],
Magenta,Line[{u,w}],Text[ToString[d13],u+1/4(-u+w)-v /10],
Dashed,Line[{o,u+w}],Text[ToString[e13],1/4(u+w)-v/10],
Dashing[{}],
Yellow,Line[{v,w}],Text[ToString[d23],v+1/4(-v+w)-u /15],
Dashed,Line[{o,v+w}],Text[ToString[e23],1/4(v+w)-u/15],
Dashing[{}],Thickness[0.005],Black,
Line[{o,u+v+w}],Text[ToString[m4],3/4(u+v+w)-v /10],
Line[{u,v+w}],Text[ToString[m1],u+3/4(-u+v+w)-v /10],
Line[{v,u+w}],Text[ToString[m2],v+3/4(u-v+w)-v /10],
Line[{w,u+v}],Text[ToString[m3],w+3/4(u+v-w)-v /10]
},BaseStyle->{Large,FontFamily->"Times",Bold}],Boxed->False]
]

Example 1

showpp[271,106,103,101,266,255]

Example 5

showpp[840,630,565,565,959,1050]