
Appendix:MATHCADProgramforIntervisibility,byThomasRiddle)f(x):=|cos(元x) Enterthefunctionasf(x)i:=0..100j:=0..100Identify the size (n)by define variablesiandj.Partitionyintonintervals.1yr i=100F, :=f(y)Calculate functional values for eachy.F-FCalculatea line-of-sightbetweenpoints intheinterval1 .k:=0..99100Create an index variable k of size (n-1)F)2+.013Calculatethe secant distanceFak+1Define a-sub zero to equal 0.% :=0The following program is the LOS(S) algorithm.C is a m xn matrix and"arc" is a summed distanceuntilthefirst non-intervisible location.Thesearc lengths arethenplottedoverlayed withtheLOS(s) :=forme0..98save-m,m+1C-0m,mm,m+for nem+2..100C :=LOS(s)ifs≥save1arc:=C-am,n-1n.msavetotherwiseThis isaplotoftheintervisibilitycurve overlayed on the function.Thefunction isthe solid curve and theintervisibility is the dashed curveThisistheplotofthefunctionJcosrxl1.5I:FF;0.5arco 0.500.50yiyi-y;204
Appendix: MATHCAD Program for Intervisibility, by Thomas Riddle Enter the function as f(x) f( x) cos(p.x) Identify the size (n) by define variables i and j. i 0. 100 j 0. 100 Partition y into n intervals. y i i 100 F i f y Calculate functional values for each y. i s i ,j F j F i j i 100 Calculate a line-of-sight between points in the interval k 0. 99 Create an index variable k of size (n-1) Calculate the secant distance a k 1 F k 1 F k 2 .012 Define a-sub zero to equal 0. a 0 0 The following program is the LOS(S) algorithm. C is a m x n matrix and "arc" is a summed distance until the first non-intervisible location. These arc lengths are then plotted overlayed with the function. LOS(s) save s m,m 1 Cm,m 0 Cm,m 1 1 Cm,n 1 Cn,m 1 save s m,n s m,n if save Cm,n 0 otherwise for nÎ m 2. 100 for m Î 0. 98 C C LOS(s) arc C a . This is a plot of the intervisibility curve overlayed on the function. The function is the solid curve and the intervisibility is the dashed curve. This is the plot of the function |cospx|. F i arci y i y i , 0 0.5 1 0 0.5 1 1.5 F i y i 0 0.5 1 0 0.5 1 204