| OCR Text |
Show 60 be closer where the first derivative of the graph deviates from zero. Linear graphs may be defined with two points, but more complex graphs need to have more points around the curves. A user loads the graph with values to cover the domain likely to be used, and if the program queries for a value out of the loaded domain, the graph function returns the last valid value of the range instead of extrapolating. Graph points are initialized in ascending order because they are stored in an array, and the lookup does a binary search followed by an interpolation. Piecewise linear interpolation is expressed in equation 5, where the graph points are (low, flow) and (high, thigh). 'val' is input and fval is returned. _ val- low x 1 . _ f ) + f 1val - high -low ( h1gh low low low~val<high (5) A graph exists in global scope and it is declared as "graph <graph_name>; ." (semicolon required) Data pairs for one curve are mapped with the keyword 'plot', as "<graph_name>. plot (<expr>, <expr>); ." For a family of curves the mapping uses: "<graph_name> [ <expr>]. plot (<expr>, <expr>); ." Without a subscript ACRE assumes a default subscript of 0. After loading a graph into ACRE, an expression to invoke linear interpolation takes the form: "<graph_name> ( <expr> ); "or "<graph_name> [<expr>] ( <expr> ); ." The graph of Figure 2.1, which indirectly maps capacitance to separation, is loaded with the following expressions: cap_graph.plot (0.1, 7.5) |