MathGroup Archive 2005

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

Search the Archive

Re: Plot Angle between Vectors

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62100] Re: Plot Angle between Vectors
  • From: "Valeri Astanoff" <astanoff at yahoo.fr>
  • Date: Fri, 11 Nov 2005 02:52:11 -0500 (EST)
  • References: <dkuvk6$7pj$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hallo Florian,

For non-oriented angles, you could do
something like this :

In[1]:=<<Graphics`

In[2]:=angles[v1_,v2_]:=
    With[{a1 = ArcCos[First[v1]/Norm[v1]],
          a2 = ArcCos[First[v2]/Norm[v2]]},
      If[a1<a2,{a1,a2},-{a1,a2}]];

In[3]:= p0={.2,.2};
	p1={1,1};
	p2={-.25,.75};

In[6]:=Show[Graphics[{Arrow[p0,p1],Arrow[p0,p2],
        Circle[p0,0.1,angles[p1-p0,p2-p0]]},
        AspectRatio -> Automatic]];
 
Out[6]= - Graphics - 


hth

V.Astanoff


  • Prev by Date: Integrate problem?
  • Next by Date: Re: Read a delimited text file into a mathematica
  • Previous by thread: Re: Plot Angle between Vectors
  • Next by thread: Re: Plot Angle between Vectors