投影

R[u_,v_]:=(({{Cos[u], -Sin[u] Sin[v], -Cos[v] Sin[u]}, {0, Cos[v], -Sin[v]}, {Sin[u], Cos[u] Sin[v], Cos[u] Cos[v]}}));
vp={0,-10,0};
vpinfty={0,-10,0};
pts={{-1,-1,-1},{1,-1,-1},{1,1,-1},{-1,1,-1},{-1,-1,1},{1,-1,1},{1,1,1},{-1,1,1}};

透視投影

Manipulate[
rotatepts=pts.R[t,s];
perspts=Table[vp-((5+vp[[2]])/(rotatepts[[i]][[2]]-vp[[2]]))*(rotatepts[[i]]-vp),{i,1,8}];
Show[
Graphics3D[{
(*立方体*)
Polygon[{rotatepts[[1]],rotatepts[[2]],rotatepts[[3]],rotatepts[[4]],rotatepts[[1]]}],
Polygon[{rotatepts[[5]],rotatepts[[6]],rotatepts[[7]],rotatepts[[8]],rotatepts[[5]]}],
Polygon[{rotatepts[[2]],rotatepts[[3]],rotatepts[[7]],rotatepts[[6]],rotatepts[[2]]}],
Polygon[{rotatepts[[1]],rotatepts[[4]],rotatepts[[8]],rotatepts[[5]],rotatepts[[1]]}],
Polygon[{rotatepts[[1]],rotatepts[[2]],rotatepts[[6]],rotatepts[[5]],rotatepts[[1]]}],
Polygon[{rotatepts[[3]],rotatepts[[4]],rotatepts[[8]],rotatepts[[7]],rotatepts[[3]]}],
(*立方体の投影像*)
Line[{perspts[[2]],perspts[[1]],perspts[[5]],perspts[[6]],perspts[[2]],perspts[[3]],perspts[[7]],perspts[[6]]}],
Line[{perspts[[1]],perspts[[4]],perspts[[3]]}],
(*投影面の枠線*)
Line[{{-3,-5,-2},{-3,-5,2},{3,-5,2},{3,-5,-2},{-3,-5,-2}}],
(*視線*)
{Dashed,Gray,Line[{{vp,rotatepts[[1]]},{vp,rotatepts[[2]]},{vp,rotatepts[[3]]},{vp,rotatepts[[4]]},{vp,rotatepts[[5]]},{vp,rotatepts[[6]]},{vp,rotatepts[[7]]}}]},
(*視点*)
{PointSize[Large],Point[vp]},Text["view point",vp+{0,-1,0.25}]
},Boxed->False
],
ParametricPlot3D[{x,-5,z},{z,-2,2},{x,-3,3},Mesh->None,PlotStyle->Directive[LightBlue,Opacity[opa]]](*投影面*)
],
{{t,0.8,"立方体の回転角（横方向）"},0.3,1.25},{{s,1,"立方体の回転角（縦方向）"},0.7,1.35},{{opa,0.5,"投影面の透明度"},0,1},SaveDefinitions->True
]

平行投影

Manipulate[
rotatepts=pts.R[t,s];
projpts=Table[{rotatepts[[i]][[1]],-5,rotatepts[[i]][[3]]},{i,1,8}];
Show[
Graphics3D[{
(*立方体*)
Polygon[{rotatepts[[1]],rotatepts[[2]],rotatepts[[3]],rotatepts[[4]],rotatepts[[1]]}],Polygon[{rotatepts[[5]],rotatepts[[6]],rotatepts[[7]],rotatepts[[8]],rotatepts[[5]]}],
Polygon[{rotatepts[[2]],rotatepts[[3]],rotatepts[[7]],rotatepts[[6]],rotatepts[[2]]}],Polygon[{rotatepts[[1]],rotatepts[[4]],rotatepts[[8]],rotatepts[[5]],rotatepts[[1]]}],
Polygon[{rotatepts[[1]],rotatepts[[2]],rotatepts[[6]],rotatepts[[5]],rotatepts[[1]]}],Polygon[{rotatepts[[3]],rotatepts[[4]],rotatepts[[8]],rotatepts[[7]],rotatepts[[3]]}],
(*立方体の投影像*)
Line[{projpts[[2]],projpts[[1]],projpts[[5]],projpts[[6]],projpts[[2]],projpts[[3]],projpts[[7]],projpts[[6]]}],
Line[{projpts[[1]],projpts[[4]],projpts[[3]]}],
(*投影面の枠線*)
Line[{{-3,-5,-2},{-3,-5,2},{3,-5,2},{3,-5,-2},{-3,-5,-2}}],
(*視線*)
{Dashed,Gray,Line[{
{projpts[[1]],rotatepts[[1]]},{projpts[[2]],rotatepts[[2]]},{projpts[[3]],rotatepts[[3]]},{projpts[[4]],rotatepts[[4]]},{projpts[[5]],rotatepts[[5]]},{projpts[[6]],rotatepts[[6]]},{projpts[[7]],rotatepts[[7]]}
}]}
},Boxed->False],
ParametricPlot3D[{x,-5,z},{z,-2,2},{x,-3,3},Mesh->None,PlotStyle->Directive[LightBlue,Opacity[opa]]](*投影面*)
],
{{t,0.8,"立方体の回転角（横方向）"},0.25,1.3},{{s,1,"立方体の回転角（縦方向）"},0.7,1.35},{{opa,0.5,"投影面の透明度"},0,1},SaveDefinitions->True
]

視点を投影面から遠ざけると，透視投影は平行投影に近づく．

Manipulate[
rotatepts=pts.R[t,s];
perspts=Table[{0,b,0}-((5+b)/(rotatepts[[i]][[2]]-b))*(rotatepts[[i]]-{0,b,0}),{i,1,8}];
Show[
Graphics3D[{
(*立方体*)
Polygon[{rotatepts[[1]],rotatepts[[2]],rotatepts[[3]],rotatepts[[4]],rotatepts[[1]]}],
Polygon[{rotatepts[[5]],rotatepts[[6]],rotatepts[[7]],rotatepts[[8]],rotatepts[[5]]}],
Polygon[{rotatepts[[2]],rotatepts[[3]],rotatepts[[7]],rotatepts[[6]],rotatepts[[2]]}],
Polygon[{rotatepts[[1]],rotatepts[[4]],rotatepts[[8]],rotatepts[[5]],rotatepts[[1]]}],
Polygon[{rotatepts[[1]],rotatepts[[2]],rotatepts[[6]],rotatepts[[5]],rotatepts[[1]]}],
Polygon[{rotatepts[[3]],rotatepts[[4]],rotatepts[[8]],rotatepts[[7]],rotatepts[[3]]}],
(*立方体の投影像*)
Line[{perspts[[2]],perspts[[1]],perspts[[5]],perspts[[6]],perspts[[2]],perspts[[3]],perspts[[7]],perspts[[6]]}],
Line[{perspts[[1]],perspts[[4]],perspts[[3]]}],
(*投影面の枠線*)
Line[{{-3,-5,-2},{-3,-5,2},{3,-5,2},{3,-5,-2},{-3,-5,-2}}],
(*視線*)
{Dashed,Gray,Line[{{{0,b,0},rotatepts[[1]]},{{0,b,0},rotatepts[[2]]},{{0,b,0},rotatepts[[3]]},{{0,b,0},rotatepts[[4]]},{{0,b,0},rotatepts[[5]]},{{0,b,0},rotatepts[[6]]},{{0,b,0},rotatepts[[7]]}}]},
(*視点*)
{PointSize[Large],Point[{0,b,0}]},Text["view point",{0,b,0}+{0,-1,0.25}]
},Boxed->False,PlotRange->{{-4,4},{-10,3},{-3,3}}
],
ParametricPlot3D[{x,-5,z},{z,-2,2},{x,-3,3},Mesh->None,PlotStyle->Directive[LightBlue,Opacity[opa]]](*投影面*)
],
{{t,0.8,"立方体の回転角（横方向）"},0.3,1.25},{{s,1,"立方体の回転角（縦方向）"},0.7,1.35},{{b,-10,"視点の位置"},-30,-7},{{opa,0.5,"投影面の透明度"},0,1},SaveDefinitions->True
]