A little unity gamelike pathfinding simulation implementation. Designed to simulate how a drone would find it's way through a maze without knowing the map in advance.
Implementation
Based on a paper on drone navigation (here)
reduced only to a 2D space, this implementation uses:
A* (here) which is a graph traversal and path search algorithm, which is often used in many fields of computer science due to its completeness and optimality.
It is used to find the most optimal path at a certain time. However when the drone moves and finds more obstacles the path might need to be recomputed. In the following examples, the thick green line represents the current path the drone will take.
Bernstein polynomial (here)
is a polynomial in the Bernstein form, that is a linear combination of Bernstein basis polynomials.
The main idea is that this numerical basis helps in approximating a curve. In this case Bézier curve (here) is a common parametric curve used in computer graphics.
For an easy explanation, having two conected segments ([P0,P1] and [P1,P2]), we start from one side on both of them (P0 and P1) and move along to the other end.
For each pair of two points we draw a line (the green line in the gif) and consider the middle point as part of the future curve, as you can see in the image on the right.