This directory (~pradeep/WWW/cs576) conatins the following files: main.C main.h template.html movie1.gif movie2.gif movie3.gif movie4.gif movie5.gif example1.txt Makefile ----------------------------------------------------------------------- Here I shall give a breif description of the various functions in main.C double action_loss(point &p, int state) takes in an initial point and a state and gives the cost of action if point in goal cost =0 otherwise cost = C_u (Constant = 1) + INFINITE *indynamic(p) double get_x(int index) double get_y(int index) return the point given the array index (point to which the array index refers to) bool chk_closeness(point dest) Checks if the point is close to the dynamic region double cost_to_go_for_action(point init, point dest, int curr_state) returns cost for an action given initial point, destination point and the current state point get_next_point(int angle_index, point &p) returns the point corresponding to the next action double cost_to_go(point init, int state,point &nextpoint) returns the minimum cost among all the actions given the initial point and the state. Also returns the destination point due to the application of the action. void dynamic() the dynamic programming algorithm which finds the optimal cost matrix. void getinput() gets the input void show(window &W1,point p,int state,char file_name[]) Display procedure. Also generates the ps files int cmp_x(const point &p1, const point &p2) int cmp_y(const point &p1, const point &p2) used to compare the coordinates of p1 and p2. void min_max() used to get the maximum and minimum point of the border bool in_goal(point p) checks if p in goal region void initialize_arr() initializes the array which used in dynamic() bool done(double A_prev[DIV][DIV], double A_curr[DIV][DIV]) checks if the dynamic programming algorithm has reached the terminating condition. bool find_region(point p, int &j,int &i) finds the four points between which point 'p' lies double get_slope(double a, double b, double c) returns the ratio in which 'b' divides 'a' and 'c' double interpolated_cost(double A[DIV][DIV],double alpha,double beta,int j,int i ) returns the Interpolated cost given the ratios in which the four points are with respect to the destination point bool in_obs(point p) checks if 'p' in obstacle region int in_dynamic(point p) checks if 'p' in dynamic region void move(double A[DIV][DIV],double B[DIV][DIV]) copies A to B int next_env(int prev_state) returns the next environment state void execute(point initial) procedure which actually executes the motion plan given an initial position of the robot and an initial environment state.