Skip to main content
added 67 characters in body
Source Link
SHuisman
  • 4.2k
  • 13
  • 17

You can add the options ViewProjection, ViewPoint, and ViewVertical to make it appear as if it isometric:

coversQ[parent_,child_]:=And[Length[parent]>=Length[child],Min[Take[parent,Length@child]-child]>=0] planepartitionQ[par_]:=MatchQ[par,{{___Integer}..}]&&If[Length[par]>1,And@@MapThread[coversQ,{Drop[par,-1],Rest[par]}],True] PlanePartitions[n_Integer]:=Module[{l1,l2,l3,l4,z,w},l1=z@@@IntegerPartitions[n]; l2=l1/.k_Integer/;(k>1):>w@@IntegerPartitions[k]; l3=l2/.z[x_w,y:(1...)]:>Thread[z[x,y],w]/.z[x__w]:>Outer[z,x]/.z[x__w,y:(1...)]:>Outer[z,x,Sequence@@({y}/.1->w[1])]/.w->Sequence; l4=l3/.z[x___List,y:(1..)]:>z[x,Sequence@@Transpose[{{y}}]]/.z->List;Cases[Union[l4],_?planepartitionQ]] PlanePartitionDiagram[l_List]:=Module[{i,j,k}, Graphics3D[{EdgeForm[{Black,Thickness[0.01]}], Table[ Cuboid[{j,-i,k}] , {i,Length[l]}, {j,Length[l[[i]]]}, {k,l[[i,j]]} ]}, Boxed->False, ViewProjection->"Orthographic", ViewPoint->{1,1,1}, Lighting -> {{"Point""Directional",  Yellow, {{0, 0, 10001}, {0, 0, 0}}}, {"Point""Directional",  Blue, {{0, 10001, 0}, {0, 0, 0}}}, {"Point""Directional",  Red, {1000{1, 0, 0}, {0, 0, 0}}}} ] ] PlanePartitionDiagram[{{3,3,2,1},{0,3,2,1},{0,3,2,1},{0,0,0,1}}] 

(should work with 11.2 and up).

enter image description here

You can add the options ViewProjection, ViewPoint, and ViewVertical to make it appear as if it isometric:

coversQ[parent_,child_]:=And[Length[parent]>=Length[child],Min[Take[parent,Length@child]-child]>=0] planepartitionQ[par_]:=MatchQ[par,{{___Integer}..}]&&If[Length[par]>1,And@@MapThread[coversQ,{Drop[par,-1],Rest[par]}],True] PlanePartitions[n_Integer]:=Module[{l1,l2,l3,l4,z,w},l1=z@@@IntegerPartitions[n]; l2=l1/.k_Integer/;(k>1):>w@@IntegerPartitions[k]; l3=l2/.z[x_w,y:(1...)]:>Thread[z[x,y],w]/.z[x__w]:>Outer[z,x]/.z[x__w,y:(1...)]:>Outer[z,x,Sequence@@({y}/.1->w[1])]/.w->Sequence; l4=l3/.z[x___List,y:(1..)]:>z[x,Sequence@@Transpose[{{y}}]]/.z->List;Cases[Union[l4],_?planepartitionQ]] PlanePartitionDiagram[l_List]:=Module[{i,j,k}, Graphics3D[{EdgeForm[{Black,Thickness[0.01]}], Table[ Cuboid[{j,-i,k}] , {i,Length[l]}, {j,Length[l[[i]]]}, {k,l[[i,j]]} ]}, Boxed->False, ViewProjection->"Orthographic", ViewPoint->{1,1,1}, Lighting->{{"Point", Yellow, {0, 0, 1000}},{"Point", Blue, {0, 1000, 0}},{"Point", Red, {1000, 0, 0}}} ] ] PlanePartitionDiagram[{{3,3,2,1},{0,3,2,1},{0,3,2,1},{0,0,0,1}}] 

(should work with 11.2 and up).

enter image description here

You can add the options ViewProjection, ViewPoint, and ViewVertical to make it appear as if it isometric:

coversQ[parent_,child_]:=And[Length[parent]>=Length[child],Min[Take[parent,Length@child]-child]>=0] planepartitionQ[par_]:=MatchQ[par,{{___Integer}..}]&&If[Length[par]>1,And@@MapThread[coversQ,{Drop[par,-1],Rest[par]}],True] PlanePartitions[n_Integer]:=Module[{l1,l2,l3,l4,z,w},l1=z@@@IntegerPartitions[n]; l2=l1/.k_Integer/;(k>1):>w@@IntegerPartitions[k]; l3=l2/.z[x_w,y:(1...)]:>Thread[z[x,y],w]/.z[x__w]:>Outer[z,x]/.z[x__w,y:(1...)]:>Outer[z,x,Sequence@@({y}/.1->w[1])]/.w->Sequence; l4=l3/.z[x___List,y:(1..)]:>z[x,Sequence@@Transpose[{{y}}]]/.z->List;Cases[Union[l4],_?planepartitionQ]] PlanePartitionDiagram[l_List]:=Module[{i,j,k}, Graphics3D[{EdgeForm[{Black,Thickness[0.01]}], Table[ Cuboid[{j,-i,k}] , {i,Length[l]}, {j,Length[l[[i]]]}, {k,l[[i,j]]} ]}, Boxed->False, ViewProjection->"Orthographic", ViewPoint->{1,1,1}, Lighting -> {{"Directional",  Yellow, {{0, 0, 1}, {0, 0, 0}}}, {"Directional",  Blue, {{0, 1, 0}, {0, 0, 0}}}, {"Directional",  Red, {{1, 0, 0}, {0, 0, 0}}}} ] ] PlanePartitionDiagram[{{3,3,2,1},{0,3,2,1},{0,3,2,1},{0,0,0,1}}] 

(should work with 11.2 and up).

enter image description here

added 844 characters in body
Source Link
SHuisman
  • 4.2k
  • 13
  • 17

You can add the options ViewProjection, ViewPoint, and ViewVertical to make it appear as if it isometric:

Show[PlanePartitionDiagram[coversQ[parent_,child_]:=And[Length[parent]>=Length[child],Min[Take[parent,Length@child]-child]>=0] planepartitionQ[par_]:=MatchQ[par,{{3___Integer}..}]&&If[Length[par]>1, 3And@@MapThread[coversQ, 2{Drop[par, 1-1],Rest[par]}], True] PlanePartitions[n_Integer]:=Module[{0l1, 3l2, 2l3, l4,z,w},l1=z@@@IntegerPartitions[n]; l2=l1/.k_Integer/;(k>1):>w@@IntegerPartitions[k]; l3=l2/.z[x_w,y:(1...)]:>Thread[z[x,y],w]/.z[x__w]:>Outer[z,x]/.z[x__w,y:(1...)]:>Outer[z,x,Sequence@@({y}/.1->w[1])]/.w->Sequence; l4=l3/.z[x___List, y:(1..)]:>z[x,Sequence@@Transpose[{0{y}}]]/.z->List;Cases[Union[l4], 3_?planepartitionQ]] PlanePartitionDiagram[l_List]:=Module[{i, 2j, k},  1Graphics3D[{EdgeForm[{Black,Thickness[0.01]}],  Table[ Cuboid[{0j, 0-i, 0k}] , 1 {i,Length[l]}, {j,Length[l[[i]]]}, {k,l[[i,j]]}  ]},  Boxed->False, ViewProjection -> "Orthographic">"Orthographic",  ViewPoint -> {1, 1, 1}, ViewVertical Lighting->{{"Point", Yellow, {0, 0, 11000}},{"Point", Blue, {0, 1000, 0}},{"Point", Red, {1000, 0, 0}}} ] ] PlanePartitionDiagram[{{3,3,2,1},{0,3,2,1},{0,3,2,1},{0,0,0,1}}] 

(should work with 11.2 and up).

enter image description hereenter image description here

You can add the options ViewProjection, ViewPoint, and ViewVertical to make it appear as if it isometric:

Show[PlanePartitionDiagram[{{3, 3, 2, 1}, {0, 3, 2, 1}, {0, 3, 2,   1}, {0, 0, 0, 1}}],  ViewProjection -> "Orthographic",  ViewPoint -> {1, 1, 1}, ViewVertical -> {0, 0, 1} ] 

(should work with 11.2 and up).

enter image description here

You can add the options ViewProjection, ViewPoint, and ViewVertical to make it appear as if it isometric:

coversQ[parent_,child_]:=And[Length[parent]>=Length[child],Min[Take[parent,Length@child]-child]>=0] planepartitionQ[par_]:=MatchQ[par,{{___Integer}..}]&&If[Length[par]>1,And@@MapThread[coversQ,{Drop[par,-1],Rest[par]}],True] PlanePartitions[n_Integer]:=Module[{l1,l2,l3,l4,z,w},l1=z@@@IntegerPartitions[n]; l2=l1/.k_Integer/;(k>1):>w@@IntegerPartitions[k]; l3=l2/.z[x_w,y:(1...)]:>Thread[z[x,y],w]/.z[x__w]:>Outer[z,x]/.z[x__w,y:(1...)]:>Outer[z,x,Sequence@@({y}/.1->w[1])]/.w->Sequence; l4=l3/.z[x___List,y:(1..)]:>z[x,Sequence@@Transpose[{{y}}]]/.z->List;Cases[Union[l4],_?planepartitionQ]] PlanePartitionDiagram[l_List]:=Module[{i,j,k}, Graphics3D[{EdgeForm[{Black,Thickness[0.01]}], Table[ Cuboid[{j,-i,k}] , {i,Length[l]}, {j,Length[l[[i]]]}, {k,l[[i,j]]}  ]}, Boxed->False, ViewProjection->"Orthographic", ViewPoint->{1,1,1}, Lighting->{{"Point", Yellow, {0, 0, 1000}},{"Point", Blue, {0, 1000, 0}},{"Point", Red, {1000, 0, 0}}} ] ] PlanePartitionDiagram[{{3,3,2,1},{0,3,2,1},{0,3,2,1},{0,0,0,1}}] 

(should work with 11.2 and up).

enter image description here

Source Link
SHuisman
  • 4.2k
  • 13
  • 17

You can add the options ViewProjection, ViewPoint, and ViewVertical to make it appear as if it isometric:

Show[PlanePartitionDiagram[{{3, 3, 2, 1}, {0, 3, 2, 1}, {0, 3, 2, 1}, {0, 0, 0, 1}}], ViewProjection -> "Orthographic", ViewPoint -> {1, 1, 1}, ViewVertical -> {0, 0, 1} ] 

(should work with 11.2 and up).

enter image description here