A module providing basic functions for vector and coordinate operations.

The include file "geometry.hrl" provides the definition of the records`#vector{}`

and `#speric{}`

,
to represent coordinates and vectors (see below)
and some macros, used to define colors, vectors and real
measurement units. The following macros
are available:
`?VECTOR(X,Y,Z)`

, defines a vector.`?RGB(R,G,B)`

, defines an RGB color; costants are real numbers in the range [0,1].`?CM(X)`

, defines a value in centimeters.`?MM(X)`

, defines a value in millimeters.`?M(X)`

, defines a value in meters.`?CM_S(X)`

, defines a linear speed in cm/s.`?DEG_S(X)`

, defines an angular speed in degree/s.

`spheric() = #spheric{}`

A record representing spheric coordinates. It has the fields:

`rho`

, the distance of the point from the origin;`theta`

, the angle formed with the*x*axis along*xy*plane;`phi`

, the angle formed with the*z*axis.

`vector() = #vector{}`

A record representing a vector (or a point) in 3D space and
has the fields `x`

, `y`

and `z`

.

add/2 | Adds two vectors. |

angle/2 | Determines the angle (in degrees) formed by two vectors. |

cartesian2spheric/1 | Converts coordinates from cartesian to spheric. |

cross/2 | Vector cross product. |

distance/2 | Compute the distance between the targets of by two vectors. |

dot/2 | Vector dot product. |

dot_v/2 | Multiplies a scalar with a vector. |

norm/1 | Computes the length of a vector. |

normalize_angle/1 | Normalizes an angle (in degrees) in the range -180, 180. |

spheric2cartesian/1 | Converts coordinates from spheric to cartesian. |

to_degrees/1 | Coverts an angle from radiants to degree. |

to_radiants/1 | Coverts an angle from degree to radiants. |

Adds two vectors.

Determines the angle (in degrees) formed by two vectors.

Converts coordinates from cartesian to spheric.

Vector cross product.

Compute the distance between the targets of by two vectors.

Vector dot product.

Multiplies a scalar with a vector.

`norm(V::vector()) -> number()`

Computes the length of a vector.

`normalize_angle(Angle::number()) -> number()`

Normalizes an angle (in degrees) in the range -180, 180.

Converts coordinates from spheric to cartesian.

`to_degrees(Angle::number()) -> number()`

Coverts an angle from radiants to degree.

`to_radiants(Angle::number()) -> number()`

Coverts an angle from degree to radiants.

*Generated by EDoc, Nov 21 2007, 10:13:23.*