LESSON+2

//**Sequential statements: __graphics__**//
 Turing provides two ways to specifically locate text around the output screen. These are: In addition, Turing provides several predefined functions which make positioning text easier. These are:
 * **locatexy** || this is used to move the cursor so that the next output from a put statement will be at the point (x,y) where the point (0,0) is the bottom left corner of the screen. (Graphics mode only) ||
 * **locate** || this is used to move the cursor so that the next output from a put statement will begin at (row, column) where row 1 is at the top of the screen and column 1 is the left side of the screen. (Text mode only) ||


 * **maxcol** || in text mode this function is used to determine the maximum number of columns on the screen ||
 * **maxrow** || in text mode this function is used to determine the maximum number of rows on a screen ||
 * **maxx** || in graphics mode this function is used to determine the maximum value of x along the x axis ||
 * **maxy** || in graphics mode this function is used to determine the maximum value of y along the y axis ||

Turing also has a number of predefined graphics functions. These are

Turing also has statement which you can use to program sound
 * **drawdot** (x,y,c) || * where x & y are coordinates on a 2 dimensional plane
 * x controls position left and right
 * , y controls position hp and down
 * c is a number from 1 to 256 representing a colour ||
 * <span style="color: #000080; font-family: Arial,Helvetica,sans-serif; font-size: 120%;">**drawline** (x1,y1,x2,y2,c) (x2,y2) ||^  ||
 * <span style="color: #000080; font-family: Arial,Helvetica,sans-serif; font-size: 120%;">**drawbox** (x1,y1,x2,y2,c) ||^  ||
 * <span style="color: #000080; font-family: Arial,Helvetica,sans-serif; font-size: 120%;">**drawoval** (x,y, xradius, yradius,c) ||^  ||
 * <span style="color: #000080; font-family: Arial,Helvetica,sans-serif; font-size: 120%;">**drawarc** (x,y, xradius, yradius,angleI, angleF,c) ||^  ||


 * **sound (**//frequency//, //duration//) || The sound command produces sound using the frequency and duration of the sound. ||
 * **play (** "cde" ) || The **play** procedure takes strings containing characters that specify notes, rests, sharps, flats and duration. The notes are the letters a to g (or A to G). A rest is p (for pause). A sharp is **+** and a flat is **-**. The durations are 1 (whole note), 2 (half note), 4 (quarter note), 8 (eight note) and 6 (sixteenth note). The character > raises to the next octave and < lowers. For example, this is the way to play C and then C sharp one octave above middle C with a rest between them, all in sixteenth notes: **play**(">6cpc+"). Blanks can be used for readability and are ignored by **play**. ||

<span style="font-family: Arial,Helvetica,sans-serif;">** Task: ** <span style="color: #000080; display: block; font-family: Arial,Helvetica,sans-serif; text-align: left;">1) Modify Assignment (1) and (2) using a graphical display of result as the output <span style="color: #000080; font-family: Arial,Helvetica,sans-serif;">2) Create a complex picture and centre it both vertically and horizontally on the screen. Animate at least one part of the picture.

3) Integrate sound into your complex picture. <span style="display: block; font-family: Arial,Helvetica,sans-serif; text-align: center;">**Remember to use procedures for each discrete part of your program. To complete Part**
 * 2 you will need to use a loop**