MathGroup Archive 1999

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

Search the Archive

Re: How to drow arrow in 3D space?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16716] Re: [mg16688] How to drow arrow in 3D space?
  • From: BobHanlon at aol.com
  • Date: Mon, 22 Mar 1999 22:33:41 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 3/20/99 7:40:31 AM, krupa at alpha.sggw.waw.pl writes:

>Arrow package draws arrows using point from 2D space.
>
>E.g.:
>A={1,3}
>B ={4,5}
>Show[Graphics[Arrow[A,B]]]
>
>but it does not work when
>A={1,2,4} and B={4,5,7}
>
>Is there any package which draws  *color* arrows in that case?
>

Jan,

Needs["Graphics`Arrow`"];

arrowList = {
		{{0, 0}, {.75, .25}}, 
		{{.25, .75}, {.5, .75}}, 
		{{.5, 1.75}, {.75, .9}}, 
		{{.25, 1.2, .25}, {.25, .75}}, 
		{{.2, .75}, {.5, .5, .5}}, 
		{{.2, .5, .9}, {.75, .75, .5}}
	};

Show[Graphics[Join[
	{Hue[.6]}, 
	Arrow[Sequence @@ #]& /@  
		(arrow2D = Select[arrowList, 
		((Length[#[[1]]] == 2) && (Length[#[[2]]] == 2))&]), 
	{Hue[0]}, 
	Arrow[Sequence @@ #]& /@ Map[Take[#, 2]&,
		Complement[arrowList, arrow2D], {2}]
]]];

Blue arrows are the two-dimensional arrows. The red arrows 
are the projections of the three-dimensional arrows onto the 
{x, y} plane.

Bob Hanlon


  • Prev by Date: DSolve Error Message
  • Next by Date: Re: Convert 2D list to delimited text?
  • Previous by thread: How to drow arrow in 3D space?
  • Next by thread: Re: How to drow arrow in 3D space?