Re: Problem with ListPlotVectorField3D
- To: mathgroup at smc.vnet.net
- Subject: [mg56093] Re: [mg56060] Problem with ListPlotVectorField3D
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 15 Apr 2005 04:47:37 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Alain, You could use ListPlotVectorField3D[vecfield, VectorHeads -> True, PlotRange -> All]; It probably makes sense to use Union on your list of vectors, simply to avoid double plotting. It doesn't seem to cause a problem here but sometimes it does cause problems in the speed of 3D rendering. I wouldn't use ListPlotVectorField3D at all. If you have DrawGraphics you could try the following to obtain much prettier arrows. Needs["DrawGraphics`DrawingMaster`"] plot1 = Draw3DItems[ {AbsoluteThickness[2], SurfaceColor[Gold], EdgeForm[ColorMix[Gold, Black][0.5]], Arrow3D[First[#], First[#] + 2Last[#], HeadScaling3D -> 1.5, HeadLength3D -> 0.3, HeadWidth3D -> 0.7] & /@ Union[vecfield]}, NeutralLighting[0.3, 0.5, 0.1], Background -> Linen, PlotRange -> All, BoxStyle -> Gray, ImageSize -> 500]; SpinShow[plot1, SpinOrigin -> {0, 0, 0}, Frames -> 48] SelectionMove[EvaluationNotebook[], All, GeneratedCell] FrontEndTokenExecute["OpenCloseGroup"]; Pause[0.5]; FrontEndExecute[{FrontEnd`SelectionAnimate[200, AnimationDisplayTime -> 0.1, AnimationDirection -> Forward]}] David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Alain Cochard [mailto:alain at geophysik.uni-muenchen.de] To: mathgroup at smc.vnet.net Mathematica 4.0 for Linux Copyright 1988-1999 Wolfram Research, Inc. -- Motif graphics initialized -- In[1]:= <<Graphics` Here is a vector field: In[2]:= vecfield={{{0, 0, 4}, {1, 0, 0}}, {{0, 0, 4}, {1, 0, 0}}, {{0, 0, 4}, {1, 0, 0}}, {{0, 0, 4}, {1, 0, 0}}, {{0, 0, 4}, {1, 0, 0}}, {{0, 0, 4}, {1, 0, 0}}, {{0, 0, 4}, {1, 0, 0}}, {{4, 0, 0}, {0, 0, 1}}, {{2, 2*Sqrt[3], 0}, {0, 0, 1/2}}, {{-2, 2*Sqrt[3], 0}, {0, 0, -1/2}}, {{-4, 0, 0}, {0, 0, -1}}, {{-2, -2*Sqrt[3], 0}, {0, 0, -1/2}}, {{2, -2*Sqrt[3], 0}, {0, 0, 1/2}}, {{4, 0, 0}, {0, 0, 1}}, {{0, 0, -4}, {-1, 0, 0}}, {{0, 0, -4}, {-1, 0, 0}}, {{0, 0, -4}, {-1, 0, 0}}, {{0, 0, -4}, {-1, 0, 0}}, {{0, 0, -4}, {-1, 0, 0}}, {{0, 0, -4}, {-1, 0, 0}}, {{0, 0, -4}, {-1, 0, 0}}}; In the following I get only 4 arrows: In[3]:= ListPlotVectorField3D[vecfield, VectorHeads -> True] Out[3]= -Graphics3D- In the following I get all the expected arrows (but without the heads). I could stop here and ask why but ... In[4]:= ListPlotVectorField3D[vecfield] Out[4]= -Graphics3D- ... in the following, I do get all the expected arrows with heads, but why? As I understand, Union is only supposed to sort and remove duplicates, so what difference does it make as far as ListPlotVectorField3D is concerned? Plus I have experimented with "some amount" of duplication without problem. In[5]:= ListPlotVectorField3D[Union[vecfield], VectorHeads -> True] Out[5]= -Graphics3D- Am I doing something wrong? Thanks, Alain