Index


RISC World

Locus

Another exclusive Foundation RISCWorld application

Exercise 9. Transformations

When you first load Locus the two main menu items Transform and Matrix will be greyed out and will remain so until a data set is dragged into Locus. This is because transforming formula drawn graphs would be too slow and therefore this is not implemented.

Let us examine various transformations on a simple irregular shape.

  1. Find the textfile entitled 'Flag' in the DataFiles directory.
  2. Turn 'auto-scaling' off and 'squaring up' on.
  3. Set the domain and range as follows:

       xmin: -5

       xmax: 5

       ymin: -5

       ymax: 5
  4. Click on the <Plot> button set set the axes.
  5. Make sure that you are in Degrees mode.
  6. Drag the 'Flag' file onto the main Locus window.
  7. Make sure that the 'Connect Marks' option in the Effects dialogue box, is on.
  8. Click MENU over the main Locus window and move the mouse down to Transform. Here you will see four transformational options. We will only look at Rotation and Reflection in this exercise, but for details of the others see the manual.
  9. Type 45 into the Angle field
  10. Type 0,0 into the Centre field
  11. Click on the <Apply> button. The flag will be duplicated but this time rotated through +45 degrees.
  12. Now click on <Apply> again. A third flag will appear. You will see that the transformation is applied this time not to the original flag but to the last one drawn. Hence the third flag is at 90 degrees to the original. If you continue to repeat this process you should end up with a full circle of flags centred around the origin.

Reflection is a little bit more complex but only marginally so.

There are two options -

  • y=mx+c which is used to produce any linear function
    1. off}


  1. Click on the clear screen button
  2. Import the 'Flag' file as previously described
  3. Open the Transform box
  4. Select the x=c icon
  5. Type -1 into the mirror line field. (To the right of 'x=' )
  6. Click on <Apply>




Now try selecting the y=mx+c icon

  1. Click on the clear screen button
  2. Import the 'Flag' file again
  3. Ensure that the Transform box is open
  4. Select the y=mx+c icon
  5. Click in the field to the right of 'y='
  6. Type -2 and press RETURN
  7. Type -1
  8. Click on the <Apply> button.
  9. Using the main function plotting facilities plot the line y=-2x-1.



Notice that the image flag is reflected using the mirror line y=-2x-1.

You can now experiment with this facility. You may like to see what happens when you transform the 'xsqu' file that you created in the last exercise.

The Matrix item in the main menu does operates in a similar manner but the transformations are entered in 2x2 matrix form instead of the descriptive form previously described. With this you can examine eigen values and vectors and the dimension crushing that some matrix transformations exhibit.

It is also possible to enter the data without using CSV, SID or Text files and for small numbers of data points this is often the preferred method of data entry. On the top row of the main control pane there is an icon showing two crosses joined with a line. Click on this icon and a window will open containing 21 writable icons. The first of these contains the axis titles. Dy default these are 'x' and 'y' and can be changed if you wish. The coordinate pairs can be entered in the other twenty icons, separating them with a comma

For example, type the following pairs into the first 4 icons.

 1,1

 1,4

 2,3

 1,2

Now click on the plot button to produce the flag which you have been using during the earlier part of this exercise.

You can also drop small data files (<20 pairs) onto the arrow icon in the coordinates window to load them if you wish.

Foundation RISCWorld

 Index