More Information On The Animate Function; Graphic Objects (Grobs) - HP 50g User Manual

Graphing calculator
Hide thumbs Also See for 50g:
Table of Contents

Advertisement

Example 2 - Animating the plotting of different power functions
Suppose that you want to animate the plotting of the functions f(x) = x
1, 2, 3, 4, in the same set of axes. You could use the following program:
«
RAD
131 R B 64 R B PDIM
0 2 XRNG 0 20 YRNG
0 4 FOR j
'X^j' STEQ
ERASE
DRAX LABEL DRAW
PICT RCL
NEXT
5 ANIMATE
»
Store this program in a variable called PWAN (PoWer function ANimation).
To run the program press J (if needed) @PWAN. You will see the calculator
drawing each individual power function before starting the animation in which
the five functions will be plotted quickly one after the other. To stop the
animation, press $.

More information on the ANIMATE function

The ANIMATE function as used in the two previous examples utilized as input
the graphics to be animated and their number. You can use additional
information to produce the animation, such as the time interval between
graphics and the number of repetitions of the graphics. The general format of
the ANIMATE function in such cases is the following:
n-graphs
n represents the number of graphics, {#X #Y} stand for the pixel coordinates
of the lower right corner of the area to be plotted (see figure below), delay is
the number of seconds allowed between consecutive graphics in the animation,
and rep is the number of repetitions of the animation.

Graphic objects (GROBs)

The word GROB stands for GRaphics OBjects and is used in the calculator's
environment to represent a pixel-by-pixel description of an image that has been
{ n {#X #Y} delay rep }
Begin program
Set angle units to radians
Set PICT screen to 131 64 pixels
Set x- and y-ranges
Start loop with j = 0,1,...,4
Store 'X^j' in variable EQ
Erase current PICT
Draw axes, labels, function
Place current PICT on stack
End FOR-NEXT loop
Animate
n
, n = 0,
ANIMATE
Page 22-29

Advertisement

Table of Contents
loading

Table of Contents