MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Vector Diagrams

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33525] Re: [mg33518] Re: Vector Diagrams
  • From: Yas <y.tesiram at pgrad.unimelb.edu.au>
  • Date: Mon, 25 Mar 2002 03:45:00 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Terry,

I've attached the replies sent to me. I tried J-PK's solution which has 
it's advantages of quick visualization but I didn't try Kevins Vector3D 
because I had settled on DJP's DrawGraphics package.

Cheers
Yas



FROM David Park
==============

Yas,

Certainly. Since your plot contains many elements I used my DrawGraphics
package, available at my web site below.

Since you probably don't have DrawGraphics yet, I have attached a .gif 
image
of the sample plot I made. I also attached the Mathematica notebook I 
used
to make the plot.

DrawGraphics makes it easy to combine many different plot elements in one
piece of graphics. It also has many useful extra routines. For example, I
used UseWireframe to make the see through sphere and disk. I used 
Arrow3D to
draw 3D vectors. I used a surface color on the arrow cones and used
NeutralLighting so that the color would not be overwhelmed by the 
standard
light sources. I used DrawAxed to draw the x,y,z axes.

DrawGraphics has complete documentation and also comes with a handy 
palette.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


FROM Jens-Peer Kuska
===================

Hi,

Mathematica has no nice 3d arrows but you may use
the arrows from

Needs["Graphics`PlotField3D`"]

Arrow[{x_, y_, z_}, {dx_, dy_, dz_}] :=
   Graphics`PlotField3D`Private`vector3D[{x, y, z}, {dx, dy, dz}, True]

and use

poly = Polygon [ Table[{Cos[phi], Sin[phi], 0}, {phi, 0, 2Pi, 2Pi/20}]];


Show[Graphics3D[{poly,
       Arrow[{0, 0, 0}, {1, 0, 0}],
       Arrow[{0, 0, 0}, {0, 1, 0}],
       Arrow[{0, 0, 0}, {0, 0, 1}]
       }
     ]
   ]


to make the axes and the ellipse.

Regards
   Jens


On Sunday, March 24, 2002, at 05:45 PM, TerryH wrote:

> Hi Kevin:
>    Could you please send me a copy of your routine for a 3D Arrow?
> Is it a package?  Also, do you know of anything equivalent in 
> MathSource?
> Many thanks in advance!
> ....Terry
>
> "Kevin J. McCann" wrote:
>
>> There is no 3D equivalent of Arrow; however, I have written a small 
>> routine
>> called Vector3D[{x1,y1,z1},{x2,y2,z2},HeadLength] that draws a line 
>> and an
>> inverted cone for the head of the vector. It works, but I usually have 
>> to
>> fiddle with the size of the cone through HeadLength to make it look 
>> right.
>> If you would like, I will send it to you.
>>
>> Kevin
>>
>> "Yas" <y.tesiram at pgrad.unimelb.edu.au> wrote in message
>> news:a7cspe$i17$1 at smc.vnet.net...
>>> Hi all,
>>> Can someone point me the right direction on how to go about drawing
>>> vector diagrams in Mathematica or if it can be done at all. I would 
>>> like
>>> to draw several vectors in a sphere. Specifically I want the xy plane 
>>> as
>>> a shaded ellipse and the three axes, originating from the centre of 
>>> the
>>> ellipse with the z-axis vertical along the page and y-axis, 
>>> horizontally
>>> along the page. In this frame I then want to draw vectors from the
>>> origin to various points within this sphere.
>>> Thanks
>>> Yas
>>>
>>>
>



  • Prev by Date: Re: Running Math Kernel Alone in OS X
  • Next by Date: Problem
  • Previous by thread: Re: Vector Diagrams
  • Next by thread: Mathematica programming guide/book ?