Animating A Graphical Image - HP 48gII Advanced User's Reference Manual

Graphing calculator
Hide thumbs Also See for 48gII:
Table of Contents

Advertisement

Example: Find the value of x for which X"FX equals 599.5. Use a guess in the vicinity of 1.
Start by keying in X"FX :
@å@é x †O3.7
*x Q3 +4.5 * x Q2
+3.9 *x +5 `
Store the program in X"FX, then enter the program name, the y-value 599.5, and the guess 1, and execute
ROOTR:
O X"FX K
O J %X²FX% `
599.5 ` 1 %ROOTR%

Animating a Graphical Image

Program WALK shows a small person walking across the display. It animates this custom graphical image by
incrementing the image position in a loop structure.
Techniques used in WALK
Custom graphical image. (Note that the programmer compiles the full information content of the graphical
!
image before writing the program by building the image interactively in the Graphics environment and then
returning it to the command line.)
FOR...STEP (definite loop). WALK uses this loop to animate the graphical image. The ending value for
!
the loop is MAXR. Since the counter value cannot exceed MAXR, the loop executes indefinitely.
WALK program listing
Program:
«
GROB 9 15 E300
140015001C001400E300
8000C110AA0094009000
4100220014102800
 walk
«
ERASE { # 0d # 0d }
PVIEW
Comments:
Puts the graphical image of the
walker in the command line.
(Note that the hexadecimal
portion of the graphics object is a
continuous integer
E300...2800. The
linebreaks do not represent
spaces.)
Creates local variable walk
containing the graphics object.
Clears PICT, then displays it.
RPL Programming Examples 2-39

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents