HP 50g Graphing Calculator User Manual
Page 738
Page 22-23
(50., 50.) 12. –180. 180. ARC
Draw a circle center (50,50), r= 12.
1 8 FOR j
Draw 8 lines within the circle
(50., 50.) DUP
Lines are centered as (50,50)
‘12*COS(45*(j-1))’ NUM
Calculate x, other end at 50 + x
‘12*SIN(45*(j-1))’ NUM
Calculates y, other end at 50 + y
R C
Convert x y to (x,y), complex num.
+
Add (50,50) to (x,y)
LINE
Draw the line
NEXT
End of FOR loop
{ } PVIEW
Show picture
»
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.