geometricbasics

Implementation of the basic geometric primitives

geometricbasics.general_position(pts, report=False)

Tests whether the point set is in general position or not. If report is set to True it return all triples of points not in general position

geometricbasics.iterate_over_points(pts, f)

Takes a function and a point set as a parameter. It applies f(p,pts-p) for every point p in pts

geometricbasics.sort_around_point(p, points, join=True, speedup=False)

Sorts points around p in CCW order.

geometricbasics.sort_around_point_py(p, points, join=True, checkConcave=True)

Python version of sort_around_point

geometricbasics.sorted(p, pts)

Checks whether the point set is sorted around p

geometricbasics.turn(p0, p1, p2)

Consider the walk form p0 to p1 to p2. Returns -1 if it is a turn to the left, 1 if it is to the right and 0 otherwise

Previous topic

Installation

Next topic

Datastructures module

This Page