Skip to main content
`Ctrl`+`K`

# Geometry

Definition of some geometric functions

tracklib.util.Geometry.cartesienne(segment)

  Fonction equation cartesienne

  Return type

    `list`[`float`, `float`, `float`]

  Returns

    liste de paramètres

tracklib.util.Geometry.__eval(param, x, y)

tracklib.util.Geometry.right(a, b, c)

tracklib.util.Geometry.direction(a, b, c)

tracklib.util.Geometry.dist_point_droite(param, x, y)

tracklib.util.Geometry.dist_point_to_segment(point, segment)

tracklib.util.Geometry.distance_to_segment(x0, y0, x1, y1, x2, y2)

  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)

  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)

tracklib.util.Geometry.proj_polyligne(Xp, Yp, x, y)

tracklib.util.Geometry.triangle_area(x0, y0, x1, y1, x2, y2)

tracklib.util.Geometry.aire_visval(track, i)

tracklib.util.Geometry.isSegmentIntersects(segment1, segment2)

tracklib.util.Geometry.intersection(track1, track2, withTime=-1)

tracklib.util.Geometry.intersects(track1, track2)

tracklib.util.Geometry.inclusion(X, Y, x, y)

tracklib.util.Geometry.transform(theta, tx, ty, X, Y)

tracklib.util.Geometry.transform_inverse(theta, tx, ty, X, Y)

tracklib.util.Geometry.azimut(x1, y1, x2, y2)

tracklib.util.Geometry.collinear(p1, p2, p3)

  ## Parameters

  p1, p2, p3 : [x, y]

  ## Returns

  bool

    DESCRIPTION.

tracklib.util.Geometry.angleBetweenThreePoints(o1, o2, o3)

  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