home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e032 / 3.ddi / FILES / GRAPHICS.PAK / GRAPHIC1.M < prev    next >
Encoding:
Text File  |  1992-07-29  |  16.5 KB  |  513 lines

  1.  
  2. (* :Title: Graphics3D *)
  3.  
  4. (* :Author: Wolfram Research, Inc. *)
  5.  
  6. (* :Summary: Additional 3D Graphics functions *)
  7.  
  8. (* :Context: Graphics`Graphics3D` *)
  9.  
  10. (* :Package Version 1.0 *)
  11.  
  12. (* :Mathematica Version 2.0 *)
  13.  
  14. (* :History:
  15.     Created March, 1991 by John M. Novak. A collection of functions
  16.     originally intended for Graphics.m by Michael Chan and Kevin McIsaac,
  17.     with modifications by Bruce Sawhill and ECM.  Modifications to Project
  18.     and Shadow by John M. Novak.
  19. *)
  20.  
  21. (* :Keywords:
  22.     Graphics, 3D, Surface, Project, Shadow
  23. *)
  24.  
  25. (* :Warning: Adds definition to the function Graphics3D. *)
  26.  
  27. BeginPackage["Graphics`Graphics3D`",
  28.         "Calculus`VectorAnalysis`",
  29.         "Utilities`FilterOptions`"]
  30.  
  31. ScatterPlot3D::usage = 
  32. "ScatterPlot3D[{{x1, y1, z1}, ...}, (options)] plots points in three 
  33. dimensions as a scatter plot.";
  34.  
  35. ListSurfacePlot3D::usage =
  36. "ListSurfacePlot3D[{{{x11, y11, z11}, ...},{{x12, y12, z12}, ...}, (options)]
  37. plots a matrix of points in three dimensions as a surface." ;
  38.  
  39. ShadowPlot3D::usage =
  40. "ShadowPlot3D[f, {x, xmin, xmax}, {y, ymin, ymax}] plots the function f over
  41. the the x and y ranges with polygons shaded according to the height of the
  42. surface, with a projection of the surface onto the xy plane.";
  43.  
  44. (* The Color option determines whether the plot is in color or gray scale.
  45. SurfaceMesh determines whether a mesh is drawn on the surface.
  46. ShadowMesh determines whether a mesh is drawn on the projection.
  47. SurfaceMeshStyle determines the style of the mesh on the surface.
  48. ShadowMeshStyle determines the style of the mesh on the projection.
  49. ShadowPosition determines the location of the projection. *)
  50.  
  51. Color::usage = 
  52. "Color is an option for ShadowPlot3D and ListShadowPlot3D, which determines
  53. whether the plot should be drawn in color.";
  54.  
  55. SurfaceMesh::usage =
  56. "SurfaceMesh is an option for ShadowPlot3D and ListShadowPlot3D, which
  57. determines whether a mesh is drawn on the surface.";
  58.  
  59. ShadowMesh::usage =
  60. "ShadowMesh is an option for ShadowPlot3D and ListShadowPlot3D, which determines
  61. whether a mesh is drawn on the projection.";
  62.  
  63. SurfaceMeshStyle::usage =
  64. "SurfaceMeshStyle is an option for ShadowPlot3D and ListShadowPlot3D, which
  65. defines the style of the mesh on the surface.";
  66.  
  67. ShadowMeshStyle::usage =
  68. "ShadowMeshStyle is an option for ShadowPlot3D and ListShadowPlot3D, which
  69. defines the style of the mesh on the projection.";
  70.  
  71. ShadowPosition::usage =
  72. "ShadowPosition is an option for ShadowPlot3D and ListShadowPlot3D, which
  73. determines whether the projection is above or below the surface (in the
  74. positive or negative z direction).";
  75.  
  76. ListShadowPlot3D::usage =
  77. "ListShadowPlot3D[array, (opts)] generates a surface representing an array of
  78. height values with polygons shaded according to the height of the surface and a
  79. projection of the surface onto the xy plane.";
  80.  
  81. Project::usage = 
  82. "Project[graphic, point] projects an image of the graphic onto a plane
  83. perpendicular to the line from the center of the graphic to point.
  84. Project[graphic, {e1, e2}, point] projects an image of the graphic onto a plane
  85. with basis vectors {e1, e2} at point, along the line from the origin to point.
  86. Project[graphic, {e1,e2},point,center] project as before, except along the
  87. line from center to point.  The projection is as seen from Infinity.";
  88.  
  89. Shadow::usage = 
  90. "Shadow[graphic, (opts)] projects images of the graphic onto the xy, xz, and yz
  91. planes.  Options XShadow, YShadow, ZShadow, XShadowPosition, YShadowPosition,
  92. and ZShadowPosition determine which projections are shown and where they are
  93. located.  The magnitude of the positions is scaled so that 1 is the width
  94. of the plot on the given axis; it is measured from the center of the
  95. plot.";
  96.  
  97. XShadow::usage =
  98. "XShadow is an option for Shadow that determines whether to draw a
  99. projection of the graphic in the x direction.";
  100.  
  101. YShadow::usage =
  102. "YShadow is an option for Shadow that determines whether to draw a
  103. projection of the graphic in the y direction.";
  104.  
  105. ZShadow::usage =
  106. "ZShadow is an option for Shadow that determines whether to draw a
  107. projection of the graphic in the z direction.";
  108.  
  109. XShadowPosition::usage = 
  110. "XShadowPosition is an option for Shadow that determines whether the
  111. projection of the graphic in the x directions is in the positive or negative x
  112. direction.";
  113.  
  114. YShadowPosition::usage = 
  115. "YShadowPosition is an option for Shadow that determines whether the
  116. projection of the graphic in the y directions is in the positive or negative y
  117. direction.";
  118.  
  119. ZShadowPosition::usage = 
  120. "ZShadowPosition is an option for Shadow that determines whether the
  121. projection of graphic in the z directions is in the positive or negative z
  122. direction.";
  123.  
  124. BarChart3D::usage =
  125. "BarChart3D[list, opts] creates a three-dimensional bar graph of the 
  126. rectangular matrix list.  BarChart3D[{{{z, style},..}..},opts] creates a bar
  127. graph with a specific style for each bar.  BarChart3D[{{{x, y, z}, style}..}] 
  128. creates a bar graph of bars scattered at specific x and y coordinates with
  129. height z and a specific style.";
  130.  
  131. (* The XSpacing and YSpacing options control the space between bars in the
  132. X and Y directions respectively.  SolidBarEdges and SolidBarEdgeStyle are
  133. options determining the style of the edges of the cuboids making up the bars
  134. of the bar chart.  SolidBarStyle is a style for the faces of the cuboids.
  135. The odd naming convention is to avoid shadowing similar options in Graphics.m.
  136. BarChart3D also accepts all options valid for Graphics3D. *)
  137.  
  138. XSpacing::usage =
  139. "XSpacing is an option for BarChart3D, which determines the amount of space
  140. between bars in the X direction.  XSpacing may be set to any real number
  141. between 0 and 1.";
  142.  
  143. YSpacing::usage =
  144. "YSpacing is an option for BarChart3D, which determines the amount of space
  145. between bars in the Y direction.  YSpacing may be set to any real number
  146. between 0 and 1.";
  147.  
  148. SolidBarEdges::usage =
  149. "SolidBarEdges is an option for BarChart3D, which determines whether the edges
  150. of the bars are drawn.";
  151.  
  152. SolidBarEdgeStyle::usage =
  153. "SolidBarEdgeStyle is an option for BarChart3D, which determines the style of
  154. the edges of the bars.";
  155.  
  156. SolidBarStyle::usage = 
  157. "SolidBarStyle is an option for BarChart3D, which determines the style of the
  158. faces of the bars.";
  159.  
  160. StackGraphics::usage =
  161. "StackGraphics[{g1, g2, ...}] generates a Graphics3D object corresponding to a
  162. \"stack\" of two-dimensional graphics objects.";
  163.  
  164. TransformGraphics3D::usage =
  165. "TransformGraphics3D[graphics3d, f] applies the function f to all lists of
  166. coordinates in graphics3d.";
  167.  
  168. SkewGraphics3D::usage = 
  169. "SkewGraphics3D[graphics, m] applies the matrix m to all coordinates in graphics.";
  170.  
  171. Graphics3D::usage =
  172. "Graphics3D[primitives, options] represents a three-dimensional graphic
  173. image.  Graphics3D[graphics] projects a two-dimensional graphic image into
  174. a three-dimensional graphic image."; 
  175.  
  176. Begin["`Private`"]
  177.  
  178. (* Define a better NumberQ *)
  179.  
  180. numberQ[x_] := NumberQ[N[x]]
  181.  
  182. (* Unit vector in the vec direction *)
  183.  
  184. normalize[vec:{_,_,_}] :=
  185.     vec/Sqrt[Apply[Plus,vec^2]]
  186.  
  187. (* BarChart3D *)
  188.  
  189. BarChart3D::badxspacing = "XSpacing must be between 0 and 1.";
  190.  
  191. BarChart3D::badyspacing = "YSpacing must be between 0 and 1.";
  192.  
  193. Options[BarChart3D] =  {XSpacing -> 0, YSpacing -> 0,SolidBarEdges->True,
  194.     SolidBarEdgeStyle->Graylevel[0],SolidBarStyle->GrayLevel[.5]} ~Join~
  195.     Options[Graphics3D];
  196.  
  197. BarChart3D[list:{{_?numberQ..}..}, opts___] :=
  198.     BarChart3D[Flatten[Table[{{x,y,list[[x,y]]},
  199.                   SolidBarStyle/.{opts}/.Options[BarChart3D]},
  200.                  {x,Length[list]},
  201.                  {y,Length[Transpose[list]]}
  202.                 ],1],opts]
  203.  
  204. BarChart3D[list:{{{_?numberQ,_}..}..}, opts___] :=
  205.     BarChart3D[Flatten[Table[{{x,y,list[[x,y,1]]},
  206.                   list[[x,y,2]]},
  207.                  {x,Length[list]},
  208.                  {y,Length[Transpose[list]]}
  209.                 ],1],opts]
  210.  
  211. BarChart3D[list:{{{_?numberQ,_?numberQ,_?numberQ},_}...},opts___] :=
  212.     Module[{x,y,xs,ys,xspacing,yspacing,boxopts,g3dopts,list1},
  213.         xspacing = XSpacing /. {opts} /. Options[BarChart3D];
  214.         If[xspacing>1 || xspacing<0,
  215.             (Message[BarChart3D::badxspacing];xspacing=0)];
  216.         yspacing = YSpacing /. {opts} /. Options[BarChart3D];
  217.         If[yspacing>1 || yspacing<0,
  218.             (Message[BarChart3D::badyspacing];yspacing=0)];
  219.         If[TrueQ[SolidBarEdges/.{opts}/.Options[BarChart3D]],
  220.             edges = EdgeForm[SolidBarEdgeStyle/.{opts}/.Options[BarChart3D]],
  221.             edges = EdgeForm[]];
  222.   g3dopts = Select[Flatten[{opts}],
  223.             (MemberQ[Map[First, Options[Graphics3D]], First[#]])&];
  224.   xs = (1-xspacing)/2;
  225.   ys = (1-yspacing)/2;
  226.   list1 = Transpose[Map[#[[1]]&,list]];
  227.   Show[
  228.            Graphics3D[Map[Flatten[{#[[2]],edges,
  229.                    Cuboid[{#[[1,1]]-xs, #[[1,2]]-ys, 0},
  230.                        {#[[1,1]]+xs, #[[1,2]]+ys, #[[1,3]]}]
  231.                       }]&,
  232.                 list]],
  233.            Flatten[{g3dopts,
  234.                BoxRatios->{1,1,1},
  235.                PlotRange->{{Min[list1[[1]]]-.5, Max[list1[[1]]]+.5},
  236.                        {Min[list1[[2]]]-.5, Max[list1[[2]]]+.5},
  237.                        All},
  238.                Axes->Automatic,
  239.                   Ticks->{Automatic,Automatic,Automatic}}]
  240.         ]
  241.     ]                                        
  242.  
  243. (* ScatterPlot3D *)
  244.  
  245. Options[ScatterPlot3D] = {PlotJoined->False}
  246.  
  247. ScatterPlot3D[l3:{{_, _, _}..}, opts___] :=
  248.     If[(PlotJoined /. {opts} /. Options[ScatterPlot3D]),
  249.         Show[Graphics3D[Line[l3]], FilterOptions[ Graphics3D, opts]],
  250.         Show[Graphics3D[Map[Point,l3]], FilterOptions[ Graphics3D, opts]]
  251.     ]
  252.  
  253. (* Make Polygons from ParametricPlot3D.m by Roman Maeder.
  254.         Used in ListSurfacePlot. *)
  255.  
  256. MakePolygons[vl_List] :=
  257.     Module[{l = vl,
  258.            l1 = Map[RotateLeft, vl],
  259.            mesh},
  260.     mesh = {l, l1, RotateLeft[l1], RotateLeft[l]};
  261.     mesh = Map[Drop[#, -1]&, mesh, {1}];
  262.     mesh = Map[Drop[#, -1]&, mesh, {2}];
  263.     Polygon /@ Transpose[ Map[Flatten[#, 1]&, mesh] ]
  264.     ]
  265.  
  266. (* ListSurfacePlot3D *)
  267.  
  268. ListSurfacePlot3D[t3_List, opts___] :=
  269.     Show[Graphics3D[MakePolygons[t3]], opts] 
  270.  
  271. (* Modified MakePolygon, used in ShadowPlot3D *)
  272.  
  273. MakePolygonCoords[vl_List] :=
  274.     Module[{l = vl,
  275.            l1 = Map[RotateLeft, vl],
  276.            mesh},
  277.     mesh = {l, l1, RotateLeft[l1], RotateLeft[l]};
  278.     mesh = Map[Drop[#, -1]&, mesh, {1}];
  279.     mesh = Map[Drop[#, -1]&, mesh, {2}];
  280.     Transpose[ Map[Flatten[#, 1]&, mesh] ]
  281.     ]
  282.  
  283. (* ShadowPlot3D *)
  284.  
  285. Options[ShadowPlot3D] = 
  286.     {PlotPoints->15, Color->True, SurfaceMesh->True,
  287.         SurfaceMeshStyle -> RGBColor[0,0,0],
  288.         ShadowMesh -> True, 
  289.         ShadowMeshStyle -> RGBColor[0,0,0],
  290.         ShadowPosition -> -1};
  291.  
  292. ShadowPlot3D[func_, {u_, umin_, umax_},  {v_, vmin_, vmax_}, opts___] :=
  293.     Module[{plotpoints = PlotPoints /. {opts} /. Options[ShadowPlot3D]},
  294.         SP0[MakePolygonCoords[
  295.             Table[N[{u, v, func}],
  296.                 {u,umin,umax,(umax-umin)/plotpoints},
  297.                 {v,vmin,vmax,(vmax-vmin)/plotpoints}]],
  298.             Flatten[{{opts},Options[ShadowPlot3D]}]]]
  299.         
  300.  
  301. (* ListShadowPlot3D *)
  302.  
  303. Options[ListShadowPlot3D] = 
  304.     {Color -> True, SurfaceMesh->True, 
  305.     SurfaceMeshStyle -> RGBColor[0,0,0],
  306.     ShadowMesh -> True,
  307.     ShadowMeshStyle -> RGBColor[0,0,0],
  308.     ShadowPosition -> -1};
  309.  
  310. ListShadowPlot3D[list_, opts___] :=
  311.     SP0[MakePolygonCoords[
  312.             Table[{x, y, N[list[[x,y]]]},
  313.                 {x,Length[Transpose[list]]},
  314.                 {y,Length[list]}]],
  315.         Flatten[{{opts},Options[ListShadowPlot3D]}]]
  316.  
  317. SP0[list_, opts___] :=
  318.     Module[{gopts, z, zmin, zmax, zrange, zshadow, shades,
  319.             color, surfacemesh, surfacemeshstyle, 
  320.             shadowmesh, shadowmeshstyle, pos, g},
  321.         gopts = Select[Flatten[{opts}], 
  322.             (MemberQ[Map[First, Options[Graphics3D]], 
  323.                 First[#]])&];
  324.         {color, surfacemesh, surfacemeshstyle, shadowmesh,
  325.              shadowmeshstyle, pos} = 
  326.             {Color, SurfaceMesh, SurfaceMeshStyle, 
  327.                 ShadowMesh, ShadowMeshStyle, 
  328.                 ShadowPosition} /. opts;
  329.         z = Map[#[[3]]&,list,{-2}];
  330.         {zmin, zmax} = {Min[z], Max[z]};
  331.         zrange = zmax - zmin;
  332.         zshadow = If[!TrueQ[pos == -1],
  333.                     zmax + zrange/2,
  334.                     zmin - zrange/2];
  335.         shades = 
  336.            If[color,
  337.             Map[Hue[#]&,
  338.                   (Apply[Plus,z,{-2}]/4 - zmin)/zrange],
  339.               Map[GrayLevel[#]&,
  340.                   (Apply[Plus,z,{-2}]/4 - zmin)/zrange]];
  341.         g = Transpose[{shades,Polygon /@ list}];
  342.         Show[
  343.             Graphics3D[
  344.                 {If[TrueQ[surfacemesh],
  345.                     EdgeForm[surfacemeshstyle],EdgeForm[]],
  346.                  g,
  347.                  If[TrueQ[shadowmesh],
  348.                     EdgeForm[shadowmeshstyle],EdgeForm[]]}
  349.                   ],
  350.             TransformGraphics3D[ Graphics3D[g],
  351.                              {#[[1]],#[[2]],zshadow}& ],
  352.             Flatten[{gopts, Lighting->False, BoxRatios->{1,1,1}}]
  353.             ]
  354.      ]
  355.  
  356. (* TransformGraphcs3D *)
  357.  
  358. TransformGraphics3D[Graphics3D[list_, opts___], f_] :=
  359.     Graphics3D[
  360.         list /. {Line[x_] :> Line[Map[f, x]],
  361.             Polygon[x_] :> Polygon[Map[f, x]],
  362.             Point[x_] :> Point[f[x]]}, {opts}]
  363.  
  364. (* SkewGraphics3D *)
  365.  
  366. SkewGraphics3D[g_Graphics3D, m_?MatrixQ] :=
  367.     TransformGraphics3D[g, (m . #)&]
  368.  
  369. (* Project *)
  370.  
  371. Project[g_Graphics3D, point:{_,_,_}] :=
  372.     Module[{p1, p2, t1, t2, t3, b1, b2,c},
  373.         p1 = PlotRange[g];
  374.         c = Map[((#[[1]] + #[[2]])/2)&,p1];
  375.         p2 = point-c;
  376.         t1 = If[TrueQ[(t2 = CrossProduct[{0,0,1},p2]) == {0,0,0}],
  377.                 CrossProduct[{0,1,0},p2],t2];
  378.         b1 = normalize[t1];
  379.         t3 = CrossProduct[p2,b1];
  380.         b2 = normalize[t3];
  381.         Project[g,{b1,b2},point,c]]
  382.  
  383. Project[g_Graphics3D, basis:{{_,_,_},{_,_,_}}, location:{_,_,_},
  384.           Optional[center:{_,_,_},{0,0,0}]] :=
  385.     TransformGraphics3D[g,
  386.         (Apply[Plus, (basis.(# - center)) basis] + location)&]
  387.  
  388. Project[g_,everything___] := Project[Graphics3D[g],everything]
  389.  
  390. (* Shadow *)
  391.  
  392. Options[Shadow] = 
  393.     {XShadow -> True, YShadow -> True, ZShadow -> True,
  394.     XShadowPosition -> -1, YShadowPosition -> 1,
  395.     ZShadowPosition -> -1};
  396.  
  397. Shadow[g_Graphics3D, opts___] :=
  398.     Module[{xmin, xmax, ymin, ymax, zmin, zmax, xshadow, 
  399.             yshadow, zshadow, xshadowposition, 
  400.             yshadowposition, zshadowposition,
  401.             image,br},
  402.         {xshadow, yshadow, zshadow, xshadowposition, 
  403.             yshadowposition, zshadowposition} = 
  404.             {XShadow, YShadow, ZShadow, XShadowPosition,
  405.              YShadowPosition, ZShadowPosition} /. {opts} /.
  406.                  Options[Shadow];
  407.         gopts = Select[Flatten[{opts}], 
  408.             (MemberQ[Map[First, Options[Graphics3D]], 
  409.                 First[#]])&];
  410.         {xmin, xmax, ymin, ymax, zmin, zmax} = 
  411.             Flatten[PlotRange[g]];
  412.         br = FullOptions[g,BoxRatios];
  413.         image = {g};
  414.         If[xshadow, 
  415.             AppendTo[image,
  416.                 Project[g,
  417.                     {(xmax+xmin)/2 + xshadowposition (xmax - xmin),
  418.                         (ymax+ymin)/2,
  419.                         (zmax+zmin)/2}]];
  420.             If[Abs[xshadowposition] > 1/2,
  421.                 br = br {(Abs[xshadowposition] + 1/2),1,1}]];
  422.         If[yshadow, 
  423.             AppendTo[image,
  424.                 Project[g,
  425.                     {(xmax+xmin)/2,
  426.                     (ymax+ymin)/2 + yshadowposition (ymax - ymin),
  427.                     (zmax+zmin)/2}]];
  428.             If[Abs[yshadowposition] > 1/2,
  429.                 br = br {1, (Abs[yshadowposition] + 1/2),1}]];
  430.         If[zshadow, 
  431.             AppendTo[image,
  432.                 Project[g,
  433.                     {(xmax+xmin)/2,
  434.                     (ymax+ymin)/2,
  435.                     (zmax+zmin)/2 + zshadowposition (zmax - zmin)}]];
  436.             If[Abs[zshadowposition] > 1/2,
  437.                 br = br {1,1, (Abs[zshadowposition] + 1/2)}]];
  438.         Show[image,Flatten[{gopts,BoxRatios->br}]]]
  439.  
  440. Shadow[g_,opts___] := Shadow[Graphics3D[g],opts] (* handle other graphics *)
  441.  
  442. (* Graphics3D *)
  443. Unprotect[Graphics3D];
  444.  
  445. Graphics3D[Graphics[primitives_,options___]] :=
  446.     Graphics3D[ZTG[primitives, 0], BoxRatios->{1,1,1},
  447.         Axes->{True, False, True},
  448.         PlotRange->{Automatic, {-1,1}, Automatic},
  449.         ViewPoint->{0, -1, -3}
  450.     ]
  451.  
  452. Protect[Graphics3D];
  453.  
  454.  
  455. (* StackGraphics *)
  456.  
  457. StackGraphics[list:{__Graphics}, zrange_:{0, 1}] :=
  458.     Module[{i},
  459.     Graphics3D[ Table[ZTG[First[ list[[i]] ], i/Length[list]], 
  460.         {i, Length[list]}], BoxRatios->{1,1,1},
  461.         Axes->{True, False, True} ]
  462.     ]
  463.  
  464. ZTG[d_List, z_] := Map[ ZTG[#, z]& , d ]
  465.  
  466. ZTG[Point[{x_, y_}], z_] := Point[{x, z, y}]
  467.  
  468. ZTG[Line[d:{{_,_}...}], z_] := Line[ Map[Insert[#, z, 2]&, d] ]
  469.  
  470. ZTG[Polygon[d:{{_,_}...}], z_] := Polygon[ Map[Insert[#, z, 2]&, d] ]
  471.  
  472. ZTG[Text[d_String, {x_, y_}, dd___], z_] := Text[d, {x,z,y}, dd]
  473.  
  474. ZTG[expr_, z_] := expr
  475.  
  476. End[] (* Private` *)
  477.  
  478. EndPackage[] (* Graphics`Graphics3D` *)
  479.  
  480. (* :Examples:
  481.     <<Graphics/ParametricPlot3D.m
  482.     g1 = CylindricalPlot3D[ r^2,{r,0,1},{phi,0,2 Pi}];
  483.     Show[ TransformGraphics3D[ g1, Cos[#] & ] ]
  484.  
  485.     Show[ Graphics3D[ Plot[ Sin[t],{t,0,Pi}]]]
  486.  
  487.     g1 = CylindricalPlot3D[ r^2,{r,0,1},{phi,0,2 Pi}];
  488.  
  489.     Show[ SkewGraphics3D[ g1, {{1,2,0},{0,1,0},{0,0,1}}] ]
  490.  
  491.     g1 = Table[ Plot[x^n, {x,0,5}], {n,5}]; Show[ StackGraphics[ g1]] 
  492.     
  493.     g1 = Plot[ Sin[x],{x,0,Pi}];
  494.     g2 = Plot[ Sin[x+0.5],{x,0,Pi}];
  495.     g3 = Plot[ Sin[x+1],{x,0,Pi}];
  496.     Show[ StackGraphics[{g1,g2,g3}] ]
  497.     
  498.     BarChart3D[ { { 1,2,3},{4,5,6}}]
  499.     
  500.     ScatterPlot3D[ Table[ { t,Sin[t],Cos[t]},{t,0,10,0.1}]]
  501.  
  502.     ScatterPlot3D[ Table[ { t,Sin[t],Cos[t]},{t,0,10,0.1}],PlotJoined->True]
  503.  
  504.     ListSurfacePlot3D[ Table[ {i,j, Sin[i j] },{i,1,10},{j,1,10}]]
  505.  
  506.     graphics = Plot3D[Sin[x y],{x,0,Pi},{y,0,Pi}];
  507.     Show[ Project[ graphics, {1,1,0}] ]
  508.  
  509.     Shadow[ graphics, ZShadow -> False ]
  510.  
  511. *)
  512.  
  513.