TSA (Animating Taylor’s Polynomials)
TSA displays in succession each graphics object created in SETTS.
Techniques used in TSA
Passing a global variable. Because SETTS takes several minutes to execute, TSA does not call SETTS. Instead, you must first execute SETTS to create the global variable TSL containing the list of graphics objects. TSA simply executes that global variable to put the list on the stack.
ANIMATE. TSA uses the ANIMATE command to display in succession each graphics object from the list.
TSA program listing |
| ||
|
|
|
|
|
| Program: | Comments: |
|
|
|
|
|
| « |
|
|
| TSL OBJ→ | Puts the list TSL on the |
|
|
| stack and converts it to 10 |
|
|
| graphics objects and the list |
|
|
| count. |
|
| { { #0 #0 } .5 0 } + | Set up the parameters for |
|
|
| ANIMATE. |
|
| ANIMATE | Displays the graphics in |
|
|
| succession. |
|
| 11 DROPN | Removes the graphics objects |
|
|
| and list count from the stack. |
|
| » |
|
|
|
|
|
|
| `OTSA K | Stores the program in TSA. |
|
|
| |
|
|
| |
Checksum: # 24644d |
| ||
Bytes: | 92.5 |
|
|
Example: Execute SETTS and TSA to build and display in succession a series of Taylor’s polynomial approximations of the sine function.
Ensure Radians mode is set and execute SETTS to build the list of graphics objects. (SETTS takes several minutes to execute.) Then execute TSA to display each plot in succession. The display shows TSA in progress.
!&H %!ANGLE% %!RAD% ( if necessary)
J%SETTS%
%TSA%
Press −to stop the animation. Press !&H %!ANGLE% %!DEG% to restore Degrees mode if desired.
RPL Programming Examples