Geometry#

Definition of some geometric functions

tracklib.util.Geometry.cartesienne(segment)[source]#

Fonction equation cartesienne

Return type

list[float, float, float]

Returns

liste de paramètres

tracklib.util.Geometry.__eval(param, x, y)[source]#
tracklib.util.Geometry.right(a, b, c)[source]#
tracklib.util.Geometry.direction(a, b, c)[source]#
tracklib.util.Geometry.dist_point_droite(param, x, y)[source]#
tracklib.util.Geometry.dist_point_to_segment(point, segment)[source]#
tracklib.util.Geometry.distance_to_segment(x0, y0, x1, y1, x2, y2)[source]#

Function to compute distance between a point and a segment

Parameters
  • x0 (float) – point coordinate X

  • y0 (float) – point coordinate Y

  • x1 (float) – segment first point X

  • y1 (float) – segment first point Y

  • x2 (float) – segment second point X

  • y2 (float) – segment second point Y

Return type

float

Returns

Distance between point and projection coordinates

tracklib.util.Geometry.projection_droite(param, x, y)[source]#

Fonction projection orthogonale sur une droite

Parameters
  • param (tuple[float, float, float]) – Paramètres a,b,c d’une droite

  • x (float) – X du point à projeter

  • y (float) – Y du point à projeter

Return type

tuple[float, float]

Returns

coordonnée xproj et yproj du point projeté

tracklib.util.Geometry.proj_segment(segment, x, y)[source]#
tracklib.util.Geometry.proj_polyligne(Xp, Yp, x, y)[source]#
tracklib.util.Geometry.triangle_area(x0, y0, x1, y1, x2, y2)[source]#
tracklib.util.Geometry.aire_visval(track, i)[source]#
tracklib.util.Geometry.isSegmentIntersects(segment1, segment2)[source]#
tracklib.util.Geometry.intersection(track1, track2, withTime=-1)[source]#
tracklib.util.Geometry.intersects(track1, track2)[source]#
tracklib.util.Geometry.inclusion(X, Y, x, y)[source]#
tracklib.util.Geometry.transform(theta, tx, ty, X, Y)[source]#
tracklib.util.Geometry.transform_inverse(theta, tx, ty, X, Y)[source]#
tracklib.util.Geometry.azimut(x1, y1, x2, y2)[source]#
tracklib.util.Geometry.collinear(p1, p2, p3)[source]#

Parameters#

p1, p2, p3 : [x, y]

Returns#

bool

DESCRIPTION.

tracklib.util.Geometry.angleBetweenThreePoints(o1, o2, o3)[source]#

Compute angle between three points (the angle is calculated for the middle point).

Parameters
  • o_1 (float) – first point

  • o_2 (float) – second point

  • o_3 (float) – third point

Returns

angle in radian