brachistochrone replication
work in progress
The brachistochrone is a problem already having been precisley analytically solved revolving about 2 points in a conservative field. The goal is to optimize a curve connecting the two points based on the time an objects takes to get from one point to the other accelerated by the conservative field.
Current idea is to divide the hypothetical into connected vectors and locally optimizing those. Problem with that being that there is no prove yet for the local optimization being part of the global optimization.
To beginn a direct connection between the start and endpoint is formed and a set amount of points is set on that direct line. The optimization happens through the function calc_time_arr(def_arr) and the function move_random_point(def_arr); the arrays used are arr and new_arr.
calc_time_arr(def_arr) calculates the time a point would take for a curve traced out by points in an arr that is supposed to be named in the def_arr argument. The calculation solves the equation
move_random_point(def_arr) moves a random point in the argument array is a random direction.
arr is the array that stores the sorted locations for every point so far.
new_arr is the array that emerges when move_random_point(def_arr) is applied to arr and thus has only a small random change from arr.
The Algorithm first runs the move_random_point(def_arr) function acting on arr, calculates both their times (or uses the stored one from a previous calculation) and stores new_arr as arr if its time is smaller and thus more optimized. Elsewise arr keeps as is. Then the prozess is repeated until there is no more possible optimizatuion being found.