robokudo.utils.math_helper

Functions

intersection_point(P1, P2, t)

Calculate the intersection point based on t value.

distance(point1, point2)

Calculate the Euclidean distance between two points.

intersecting_spheres(P1, P2, spheres)

Check where the first intersection between the line segment described by P1 and P2

does_line_intersect_sphere(P1, P2, C, r)

Module Contents

robokudo.utils.math_helper.intersection_point(P1, P2, t)

Calculate the intersection point based on t value.

robokudo.utils.math_helper.distance(point1, point2)

Calculate the Euclidean distance between two points.

robokudo.utils.math_helper.intersecting_spheres(P1, P2, spheres)

Check where the first intersection between the line segment described by P1 and P2 and the spheres in our parameters happens.

spheres must be a list of triples (name, center, radius)

Returns a list of tuples: (dist to P1, name, Center, radius, first_intersection_from_P1))

robokudo.utils.math_helper.does_line_intersect_sphere(P1, P2, C, r)