       Re: help with mathematica 5.2-Vector

• To: mathgroup at smc.vnet.net
• Subject: [mg84493] Re: help with mathematica 5.2-Vector
• From: "Dr. Wolfgang Hintze" <weh at snafu.de>
• Date: Sat, 29 Dec 2007 19:59:12 -0500 (EST)
• References: <fl4unn\$9o5\$1@smc.vnet.net>

```First define the points (and the origin o) as three dimensional vectors

a = {1, 2, 3};
b = {2, 3, 4};
o = {0, 0, 0};

Then create the Graphics primitives using Line for the three vector
differences OA, OB, AB

lna = Line[{o, a}];
lnb = Line[{o, b}];
lnab = Line[{a, b}];

Then generate the corresponding Graphics objects. Notice that
formatting has to go here (I have taken the freedom to color the three
vectors in red, green, and blue):

ga = Graphics3D[{RGBColor[0, 1, 0], Thickness[0.02], lna}];
gb = Graphics3D[{RGBColor[0, 0, 1], Thickness[0.02], lnb}];
gab = Graphics3D[{RGBColor[1, 0, 0], Thickness[0.02], lnab}];

Finally, show all objects together

Show[gab, ga, gb];

Regards,
Wolfgang

"george" <mariuska1989 at hotmail.com> schrieb im Newsbeitrag
news:fl4unn\$9o5\$1 at smc.vnet.net...
> Hello! I started recently working with Mathematica 5.2 and I face a
> problem that I'm trying to solve but I can't find the solution: I
> have 2 vectors, let's say:
> a=(1,2,3)
> b=(2,3,4)
> I want to make the graph for c=a-b(it should be an arrow, at
> 3-Dimensions, right?).
> I use the command ListPlot(c), nevertheless it produces  cartesian
> axes with 2 points(I suppose these are the heads of the arrows, but
> I'm not sure).
> Is there anything to do in order to make the correct graph?
> (if the graph is not supposed to be an arrow, is not supposed to be
> at 3-Dimensions, it would be really helpful if someone could explain
> me why).