# HP F2226A - 48GII Graphic Calculator User Manual Page 739

Graphing calculator.

«
DEG
0. 100. XRNG
0. 50. YRNG
ERASE
(5., 2.5) (95., 47.5) BOX
(50., 50.) 10. 0. 360. ARC
(50., 50.) 12. –180. 180. ARC
1 8 FOR j
(50., 50.) DUP
'12*COS(45*(j-1))'
'12*SIN(45*(j-1))'
R
C
+
LINE
NEXT
{ } PVIEW
"
Example 2 - A program to plot a natural river cross-section
This application may be useful for determining area and wetted perimeters of
natural river cross-sections. Typically, a natural river cross section is surveyed
and a series of points, representing coordinates x and y with respect to an
arbitrary set of coordinates axes. These points can be plotted and a sketch of
the cross section produced for a given water surface elevation. The figure
below illustrate the terms presented in this paragraph.
The program, available in the diskette or CD ROM that comes with your
calculator, utilizes four sub-programs FRAME, DXBED, GTIFS, and INTRP. The
main program, called XSECT, takes as input a matrix of values of x and y,
and the elevation of the water surface Y (see figure above), in that order. The
program produces a graph of the cross section indicating the input data with
points in the graph, and shows the free surface in the cross-section.
Start program
Select degrees for angular measures
Set x range
Set y range
Erase picture
Draw box from (5,5) to (95,95)
Draw a circle center (50,50), r =10.
Draw a circle center (50,50), r= 12.
Draw 8 lines within the circle
Lines are centered as (50,50)
NUM
Calculate x, other end at 50 + x
NUM
Calculates y, other end at 50 + y
Convert x y to (x,y), complex num.
Add (50,50) to (x,y)
Draw the line
End of FOR loop
Show picture
Page 22-23