Re: Is there a better way to do a 3D List Plot?
- To: mathgroup at smc.vnet.net
- Subject: [mg7385] Re: Is there a better way to do a 3D List Plot?
- From: tburton at cts.com (Tom Burton)
- Date: Fri, 30 May 1997 01:19:34 -0400 (EDT)
- Organization: Brahea Consulting
- Sender: owner-wri-mathgroup at wolfram.com
On 27 May 1997 10:29:40 -0400, in comp.soft-sys.math.mathematica you wrote: >I have a list of data that I would like to plot >that looks like: > >ResistMap3D1 = > {{-1260,0,5060},{-840,0,5048},{-420,0,5032},{0,0,5046},{420,0,5041},{840,0, > 5046},{1260,0,5052},{0,-1260,5047},{0,-840,5023},{0,-420,5037},{0,420, > 5037},{0,840,5031},{0,1260,5056},{-840,840,5057},{840,840,5061},{ > 840,-840,5048},{-840,-840,5047},{-420,420,5037},{420,420,5033},{ > 420,-420,5034},{-420,-420,5036}}; > >It's format it {x,y,z}. > >The only way I know of to plot this is: > >Resistpp = > Show[Graphics3D[Point[{-1260,0,5060}]],Graphics3D[Point[{-840,0,5048}]], > Graphics3D[Point[{-420,0,5032}]],Graphics3D[Point[{0,0,5046}]], > Graphics3D[Point[{420,0,5041}]],Graphics3D[Point[{840,0,5046}]], > Graphics3D[Point[{1260,0,5052}]],Graphics3D[Point[{-420,420,5037}]], > Graphics3D[Point[{420,420,5033}]],Graphics3D[Point[{420,-420,5034}]], > Graphics3D[Point[{-420,-420,5036}]],Graphics3D[Point[{-840,840,5057}]], > Graphics3D[Point[{840,840,5061}]],Graphics3D[Point[{840,-840,5048}]], > Graphics3D[Point[{-840,-840,5047}]],Graphics3D[Point[{0,-1260,5047}]], > Graphics3D[Point[{0,-840,5023}]],Graphics3D[Point[{0,-420,5037}]], > Graphics3D[Point[{0,420,5037}]],Graphics3D[Point[{0,840,5031}]], > Graphics3D[Point[{0,1260,5056}]],AspectRatio->1,ViewPoint -> {0,1,0}]; > >Is there a better way? And I can't get the point size to be big enough >to see. Is there a way to increase the size? >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /| ________Ec My message to you is: Be courageous! I have > / |/________Ei lived a long time. I have seen history repeat > Vg------| |/--------Ef itself again and again. I have seen many > | | ________Ev depressions in business. Always America > Ef------| |/ has come out stronger and more prosperous. > Be as brave as your fathers before you. > Have faith! Go forward. > Jason Welter --- Thomas A. Edison's > jason at pernet.com last public mesage. > > Yes, you can instruct Graphics3D directly to make bigger points, but there are much better ways! First, a 3D scatterplot will accept a change in point size. The following expression makes pretty big points. Needs["Graphics`Graphics3D`"] ScatterPlot3D[ResistMap3D1,PlotStyle->PointSize[.02],BoxRatios->{1,1,1/3}] You can also make a surface. It's just a bit of work because the points are not arranged in a 2D array. First, form triangles connecting the points in the x-y plane: Needs["DiscreteMath`ComputationalGeometry`"] trival=DelaunayTriangulation[ResistMap3D1/.{x_,y_,z_}->{x,y}] This algorithm is apparently not robust. This pattern of points leads to a failure, and the resulting surface is not complete. So off the top of my head, I decided to jiggle the points a bit in the x-y plane: trival=DelaunayTriangulation[ ResistMap3D1/.{x_,y_,z_}->{x+10Random[]-5,y+10Random[]-5}] These points generate more complaints but a better triangulation. Then plot the surface. TriangularSurfacePlot[ResistMap3D1,trival,BoxRatios->{1,1,1}] Tom Burton