HP 48gII User Manual

Page 739

Advertising
background image

Page 22-23

«

Start

program

DEG

Select degrees for angular measures

0. 100. XRNG

Set x range

0. 50. YRNG

Set y range

ERASE

Erase

picture

(5., 2.5) (95., 47.5) BOX

Draw box from (5,5) to (95,95)

(50., 50.) 10. 0. 360. ARC

Draw a circle center (50,50), r =10.

(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.

Advertising
This manual is related to the following products: