comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Calculate the included angle between two vectors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Calculate the included angle between two vectors [message #65981 is a reply to message #65976] Thu, 09 April 2009 08:43 Go to previous message
Pierre V. is currently offline  Pierre V.
Messages: 13
Registered: December 2006
Junior Member
On Apr 9, 7:14 am, "dux...@gmail.com" <dux...@gmail.com> wrote:
> Is there a function which can calculate the included  angle between
> two three-dimensional vectors?
>
> jdu

Here's a simple solution. Assume v1 and V2 are each three-element
vectors of any magnitude. Compute the angle in degrees as follows:

angle = acos( transpose(v1)#v2 / sqrt(total(v1^2)) / sqrt(total
(v2^2)) ) * 180./!pi

Good luck.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Filling Contour with Patterns
Next Topic: Re: ENVI_INIT_TILE tiling problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 17:27:46 PDT 2025

Total time taken to generate the page: 1.76395 seconds