HP 39GS HP 39gs_40gs_Mastering The Graphing Calculator_English_E_F2224-90010.p - Page 268
Example aplet #2 – The Transformer Aplet, SHIFT, NOTEPAD, SETVIEWS, VIEWS, TRANSF.SV, TRANSF.PLOT
UPC - 808736931328
View all HP 39GS manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 268 highlights
Example aplet #2 - The Transformer Aplet If you haven't already, read pages 234 which explain how to create a copy of the Parametric aplet to explore geometric transformations using matrices. We will now look at using programming to enhance this aplet by automating the process. Start by highlighting the Parametric aplet and pressing . Now the aplet under the new name 'Transformer'. Press SHIFT NOTE (not NOTEPAD) and enter some explanatory text into the aplet's Note view. You can use the text shown right. The next step is to create the 'helper' programs for the aplet, including the one containing the SETVIEWS command used to create a new VIEWS menu for the aplet. These programs are shown on the next page. When you have typed them all in then the program .TRANSF.SV to create the VIEWS menu. Programs for the aplet 'Transformer' are given below. .TRANSF.SV .TRANSF.S .TRANSF.PLOT This program sets up the VIEWS menu to call each of the other programs. It need only be run once at the creation of the aplet, but is attached via the final line so that it will be sent with all the others if the aplet is transmitted. The new user does not have to re-run it: it will never normally be run again unless the menu needs to be modified. The " character can be found in the CHARS menu. This program sets up the required axes using variables from the PLOT SETUP view. It then loads the equations and ensures they are ed and ready for use. Finally it loads the initial values into the matrices. Note that the angle measure is not set since it is not essential. The user may want to use a rotational matrix and can choose their own settings for this. This program changes the value of Xmin and then changes it back. In the original version the user had to press PLOT to force a re draw. This technique fools the calculator into thinking that the PLOT view has changed and therefore forces a re draw without the need to press a key. It also remultiplies the matrices in case the user has changed one by hand instead of going through the VIEWS menu. 268