Package pygext :: Package math :: Module vecalg
[frames | no frames]

Module pygext.math.vecalg

Vector algebra
Function Summary
  angle(A, B)
angle(A,B) -> angle
  direction(V)
direction(V) -> angle
  midnormal(A, B)
midnormal(A,B) - > C A unit vector in the midpoint angle between A and B.
  ortho(A)
ortho(A) -> B
  orthounit(A)
orthounit(A) -> B
  sincos(angle, magnitude)
  unitvec(A)
univec(A) -> B
  vec(x, y)
vec(x,y) -> numarray
  veclen(A)
veclen(A) -> float

Function Details

angle(A, B)

angle(A,B) -> angle

The angle between A and B

direction(V)

direction(V) -> angle

The direction in degrees where the vector is pointing. 0 degrees is up.

midnormal(A, B)

midnormal(A,B) - > C

A unit vector in the midpoint angle between A and B.

I.e.

A  C  B
 \ | /
  \|/

ortho(A)

ortho(A) -> B

New vector that is orthogonal to A

orthounit(A)

orthounit(A) -> B

New unit vector that is orthogonal to A

unitvec(A)

univec(A) -> B

Unit vector with the same direction as A

vec(x, y)

vec(x,y) -> numarray

Wrap coordinates to a Numeric array

veclen(A)

veclen(A) -> float

Length of a vector.

Generated by Epydoc 2.1 on Mon Jun 12 18:21:21 2006 http://epydoc.sf.net