E
E
x
x
a
a
m
m
p
p
l
l
e
e
a
a
p
p
l
l
e
e
t
t
#
#
2
2
–
–
T
T
h
h
e
e
T
T
r
r
a
a
n
n
s
s
f
f
o
o
r
r
m
m
e
e
r
r
A
A
p
p
l
l
e
e
t
t
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 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 re-
multiplies the matrices in case
the user has changed one by
hand instead of going
through the
VIEWS
menu.
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.
268