Turing Graphics

As a class, view the Turing Graphics - Screen Coordinates slideshow.

You will need to refer to Turing Graphics Commands to do the assignments on this page. You may also find this colour chart1 useful (opens in new window).

[Instructor Link: Lesson Plan]

Assignment 1

In pairs, experiment with and discuss the use of some of the more interesting commands on the Turing Graphics commands, above. Be prepared to share with the class.

The following assignments are to be completed individually.

Assignment 2

Write a program that draws lines:

    • from (0, 0) to (399, 299),

    • from (0, 150) to (399, 150),

    • from (0, 299) to (399, 0), and

    • from (200, 0) to (200, 299)

Save as graphicsLines.t.

Assignment 2a

Write a program that draws lines:

    • from (125, 125) to (325, 50),

    • from (0, 75) to (225, 50),

    • from (75, 150) to (300, 25), and

    • from (250,100) to (175, 250).

Save as graphicsLines2.t.

Assignment 3

Write a program that draws boxes:

    • from (50, 50) to (300, 200),

    • from (100, 100) to (350, 250), and

    • from (0, 0) to (399, 299).

Save as graphicsBoxes.t.

Assignment 4

Write a program that draws boxes:

    • from (75, 50) to (125, 100),

    • from(150, 125) to (225, 275), and

    • from (350, 25) to (399, 250).

Save as graphicsBoxes2.t.

Assignment 5

Write a program that draws ovals with the following centres, x-radii, and y-radii:

    • (150, 100), xr = 75, yr = 50, and

    • (275, 175), xr = 100, yr = 75.

Save as graphicsOvals.t.

Assignment 6

Write a program that draws ovals with the following centres, x-radii, and y-radii:

    • (175, 75), xr = 125, yr = 25, and

    • (225, 200), xr = 50, yr = 100.

Save as graphicsOvals2.t.

Assignment 7

Write a program that manually prints 16 dots to the screen starting at coordinate (50,300) and then every 10 pixels to the right for each subsequent dot. Start the first dot with color 0 and final dot with colour 15.

Save as graphicsDots.t.

Assignment 8

Using only the drawline() command, draw a green square in the middle of the screen with sides 100 pixels long.

Save as graphicsGreenSquare.t.

Assignment 9

Without using drawbox(), draw a house that is 100 pixels wide and 150 pixels high. Add a roof that has the top point of the roof 60 pixels higher than the top of the front of the house. Add a door and two windows, chimney, and have smoke coming out the chimney. Be sure the house in centered on the screen.

Save as graphicsHouse.t.

Assignment 10

Refer to the example landscapes. As a class, we will brainstorm the marking requirements for this assignment, then you will create your own landscape using those requirements.

For this year's class, your landscape must include each of the following objects:

  • house

    • smoke

    • rainbow

    • grass

    • tree

    • rocket

    • snowman

Save as landscape.t

1Source: http://compsci.ca/v3/uploads/attachments/color_chart_for_turing.jpg