Table of Contents

Module: geometry bkchem/oasa/oasa/geometry.py

support module for some geometric mesurements ( geometric tramforms are in transform.py)

Imported modules   
from math import sqrt, atan2, pi, cos, sin
from misc import signum
Functions   
angle_between_lines
clockwise_angle_from_east
find_parallel
get_parallel_distance
get_parallel_signum
line_length
on_which_side_is_point
point_on_circle
  angle_between_lines 
angle_between_lines ( l1,  l2 )

returns angle between two lines

  clockwise_angle_from_east 
clockwise_angle_from_east ( dx,  dy )

returns the angle in clockwise direction between the center-east line and direction

  find_parallel 
find_parallel (
        x1,
        y1,
        x2,
        y2,
        d,
        )

returns tuple of coordinates for parallel abscissa in distance d

  get_parallel_distance 
get_parallel_distance ( l1,  l2 )

returns distance of two parallels - does not check whether the two are really parallels

  get_parallel_signum 
get_parallel_signum ( l1,  l2 )

  line_length 
line_length ( ( )

  on_which_side_is_point 
on_which_side_is_point ( line,  point )

tells whether a point is on one side of a line or on the other (1,0,-1) - 0 is for point on line. line is given as sequence of four coordinates, point as sequence of two coords

  point_on_circle 
point_on_circle (
        center_x,
        center_y,
        radius,
        direction=(),
        resolution=15,
        )

finds point on circle in direction of (dx, dy), optionaly rounds the angle according to resolution


Table of Contents

This document was automatically generated on Wed Jun 1 11:05:30 2005 by HappyDoc version 2.1