Year 7 Mathematics · AC9M7SP04

Spatial Algorithms and Decision Processes

design and create algorithms involving a sequence of steps and decisions that will sort and classify sets of shapes according to their attributes, and describe how the…

Ready to project and teach

Learning goalsSay it simply

We are learning to design precise spatial algorithms that use ordered steps, decisions, repetition and stopping conditions.

A spatial algorithm is a finite set of precise instructions for constructing, transforming or navigating a geometric object. Its input and coordinate system must be stated, and a translation needs a vector, a reflection needs a mirror line, and a rotation needs a centre, angle and direction.

Iteration repeats a defined block of steps, but the algorithm must say whether each new transformation acts on the original object or the latest image. A counter or geometric condition controls repetition, and a stopping condition prevents an endless loop or an unwanted duplicate image.

Decision branches make the next action depend on a test such as whether a point lies inside a boundary. A reliable algorithm gives an action for every possible result, can be traced manually on a small input, and produces the same output whenever the same input and conditions are used.

Success criteria

  • I can state the input, transformation details and order of steps in a reproducible spatial algorithm.
  • I can trace iterations and decision branches to predict an algorithm's geometric output.
  • I can identify ambiguity or a faulty stopping rule and repair the algorithm.
Key conceptTeach from the board

Use these models to connect the mathematical idea to values, diagrams, coordinates, graphs or structure before moving to symbolic calculation.

Follow each example from representation and setup through calculation/reasoning, interpretation and an independent check.

Example 1

Writing a finite algorithm for a sixfold rotation design.

  1. Input one triangle, record it as the first image, and set image_count to 1.
  2. Test whether image_count equals 6; if it does, output the design and stop.
  3. If image_count is less than 6, rotate the latest image 60 degrees anticlockwise about the origin, record the new image and add 1 to image_count.
  4. Return to the decision, producing images at 0, 60, 120, 180, 240 and 300 degrees without adding a duplicate at 360 degrees.

Final answer: The algorithm records exactly six equally spaced images and stops when image_count reaches 6.

Check: Tracing the counter gives five rotations after the original, and one further rotation would reproduce the original position, so the stopping condition is correct.

Example 2

Tracing and debugging a repeated translation.

  1. Start with triangle A(0, 0), B(2, 0), C(1, 2), record it, and set triangle_count to 1.
  2. While triangle_count is less than 4, translate every vertex of the latest image by (3, 0), record the image and add 1 to triangle_count.
  3. The next A-vertices are (3, 0), (6, 0) and (9, 0), with the B- and C-vertices changing by the same vector each time.
  4. Stop at triangle_count equals 4, because using 'repeat until the row looks long enough' would not give a reproducible output.

Final answer: The output contains four congruent triangles whose A-vertices are (0, 0), (3, 0), (6, 0) and (9, 0).

Check: Every corresponding coordinate differs by the fixed vector (3, 0), and the counter ends at exactly four recorded triangles.

Example 3

Application problem 1

Problem: An algorithm says: rotate a shape 90° clockwise about the origin, repeat 4 times, then stop. Explain the final position and identify the condition that guarantees the algorithm terminates.

  1. Plan: Represent the information first, then calculate, interpret and independently check the result.
  2. Work: Four 90° rotations total 360°, so the shape returns to its starting position. The fixed repeat count of 4 is the termination condition.
  3. Interpret: This synthesis problem combines the chapter's core representation, calculation and reasoning skills.

Final answer: Four 90° rotations total 360°, so the shape returns to its starting position. The fixed repeat count of 4 is the termination condition.

Check: This synthesis problem combines the chapter's core representation, calculation and reasoning skills.

Example 4

Application problem 2

Problem: Design an algorithm that creates a row of four congruent triangles from A(0, 0), B(2, 0), C(1, 2) using translation by (3, 0), and include an explicit decision and stopping rule.

  1. Plan: Count the original as the first triangle and test the count before adding each new image.
  2. Work: Record the original and set count to 1; if count equals 4, output and stop, otherwise translate every vertex of the latest triangle by (3, 0), record it, add 1 to count and return to the decision, producing A-vertices at (0, 0), (3, 0), (6, 0) and (9, 0).
  3. Interpret: The algorithm combines a fixed transformation with a counter-controlled loop that outputs exactly four triangles.

Final answer: Record the original and set count to 1; if count equals 4, output and stop, otherwise translate every vertex of the latest triangle by (3, 0), record it, add 1 to count and return to the decision, producing A-vertices at (0, 0), (3, 0), (6, 0) and (9, 0).

Check: The algorithm combines a fixed transformation with a counter-controlled loop that outputs exactly four triangles.

Clean visual examplesOne-page board

Clean one-page examples

AC9M7SP04 - Spatial Algorithms and Decision Processes
Example 1

Example 1 Writing a finite algorithm for a sixfold rotation design. Input one triangle, record it as the first image, and set image_count to 1. Test whether image_count equals 6; if it does, output the design and stop. If image_count is less than 6, rotate the latest image 60 degrees anticlockwise about the origin, record the new image and add 1 to image_count. Return to the decision, producing images at 0, 60, 120, 180, 240 and 300 degrees without adding a duplicate at 360 degrees. Final answer: The algorithm records exactly six equally spaced images and stops when image_count reaches 6. Check: Tracing the counter gives five rotations after the original, and one further rotation would reproduce the original position, so the stopping condition is correct.

Example 2

Example 2 Tracing and debugging a repeated translation. Start with triangle A(0, 0), B(2, 0), C(1, 2), record it, and set triangle_count to 1. While triangle_count is less than 4, translate every vertex of the latest image by (3, 0), record the image and add 1 to triangle_count. The next A-vertices are (3, 0), (6, 0) and (9, 0), with the B- and C-vertices changing by the same vector each time. Stop at triangle_count equals 4, because using 'repeat until the row looks long enough' would not give a reproducible output. Final answer: The output contains four congruent triangles whose A-vertices are (0, 0), (3, 0), (6, 0) and (9, 0). Check: Every corresponding coordinate differs by the fixed vector (3, 0), and the counter ends at exactly four recorded triangles.

Example 3

Example 3 Application problem 1 Problem: An algorithm says: rotate a shape 90° clockwise about the origin, repeat 4 times, then stop. Explain the final position and identify the condition that guarantees the algorithm terminates. Plan: Represent the information first, then calculate, interpret and independently check the result. Work: Four 90° rotations total 360°, so the shape returns to its starting position. The fixed repeat count of 4 is the termination condition. Interpret: This synthesis problem combines the chapter's core representation, calculation and reasoning skills. Final answer: Four 90° rotations total 360°, so the shape returns to its starting position. The fixed repeat count of 4 is the termination condition. Check: This synthesis problem combines the chapter's core representation, calculation and reasoning skills.

Example 4

Example 4 Application problem 2 Problem: Design an algorithm that creates a row of four congruent triangles from A(0, 0), B(2, 0), C(1, 2) using translation by (3, 0), and include an explicit decision and stopping rule. Plan: Count the original as the first triangle and test the count before adding each new image. Work: Record the original and set count to 1; if count equals 4, output and stop, otherwise translate every vertex of the latest triangle by (3, 0), record it, add 1 to count and return to the decision, producing A-vertices at (0, 0), (3, 0), (6, 0) and (9, 0). Interpret: The algorithm combines a fixed transformation with a counter-controlled loop that outputs exactly four triangles. Final answer: Record the original and set count to 1; if count equals 4, output and stop, otherwise translate every vertex of the latest triangle by (3, 0), record it, add 1 to count and return to the decision, producing A-vertices at (0, 0), (3, 0), (6, 0) and (9, 0). Check: The algorithm combines a fixed transformation with a counter-controlled loop that outputs exactly four triangles.

Curriculum examplesCopied content

Content description: design and create algorithms involving a sequence of steps and decisions that will sort and classify sets of shapes according to their attributes, and describe how the algorithms work.

Questions and answersWith answers

Attempt each problem before opening Check answer. The set moves from core understanding to application and synthesis.

  1. 1. State the missing information in the instruction 'Rotate point P by 90 degrees.'

    Check answer

    Answer: The instruction must state the centre of rotation and whether the turn is clockwise or anticlockwise.

    Hint: Ask where the point turns around and in which direction it moves.

    Why: An angle alone does not uniquely define a rotation.

  2. 2. A loop records the original square as image 1 and adds one translated image each time until image_count equals 5; how many translations are performed?

    Check answer

    Answer: The loop performs 4 translations.

    Hint: Count the additional images needed after image 1.

    Why: The original is already counted, so four new images are needed to reach a total of five.

  3. 3. Explain the purpose of a stopping condition in a spatial algorithm.

    Check answer

    Answer: A stopping condition ends repetition when the required geometric output has been produced.

    Hint: Consider what would happen if a loop had no instruction telling it when to end.

    Why: A measurable stopping rule makes the algorithm finite and reproducible.

  4. 4. Start at point (1, 2) and repeat the translation (3, −1) twice; what are the coordinates after each iteration?

    Check answer

    Answer: After the first iteration the point is (4, 1), and after the second iteration it is (7, 0).

    Hint: Use the first image, not the original point, as the input to the second iteration.

    Why: Each iteration adds the same vector to the latest image coordinate.

  5. 5. Repair the instruction 'Move every vertex to the right and down' so it defines one exact coordinate transformation.

    Check answer

    Answer: One valid repair is 'Translate every vertex by the vector (4, −2), so add 4 to x and subtract 2 from y.'

    Hint: Choose and state an exact horizontal change and an exact vertical change.

    Why: A numerical vector replaces vague direction words with a reproducible movement.

  6. 6. An algorithm tests whether any transformed vertex has x greater than 10; write complete actions for both outcomes so the design remains inside the grid.

    Check answer

    Answer: If any vertex has x greater than 10, discard that image and stop; otherwise, record the image and continue to the next iteration.

    Hint: Write one instruction for when the boundary is crossed and one for when it is not.

    Why: A complete decision specifies distinct actions for both the true and false results.

  7. 7. An algorithm reflects the latest image in the y-axis repeatedly and is meant to make two distinct images; identify an appropriate stopping condition.

    Check answer

    Answer: Record the original, reflect it once in the y-axis, record the image, and stop when image_count equals 2.

    Hint: Trace the effect of applying the same reflection twice.

    Why: A second reflection would return to the original position and create a duplicate.

  8. 8. Trace this algorithm: begin with P(1, 0), set count to 0, and while count is less than 3 rotate the latest point 90 degrees anticlockwise about the origin and add 1 to count; list every new coordinate.

    Check answer

    Answer: The three new coordinates are (0, 1), (−1, 0) and (0, −1), after which count equals 3 and the loop stops.

    Hint: Record the coordinate and counter value after each rotation before testing the loop again.

    Why: Repeated 90-degree anticlockwise rotations apply (x, y) to (−y, x) to the latest point three times.

  9. 9. Design an algorithm that creates a row of four congruent triangles from A(0, 0), B(2, 0), C(1, 2) using translation by (3, 0), and include an explicit decision and stopping rule.

    Check answer

    Answer: Record the original and set count to 1; if count equals 4, output and stop, otherwise translate every vertex of the latest triangle by (3, 0), record it, add 1 to count and return to the decision, producing A-vertices at (0, 0), (3, 0), (6, 0) and (9, 0).

    Hint: Count the original as the first triangle and test the count before adding each new image.

    Why: The algorithm combines a fixed transformation with a counter-controlled loop that outputs exactly four triangles.

  10. 10. An algorithm says: rotate a shape 90° clockwise about the origin, repeat 4 times, then stop. Explain the final position and identify the condition that guarantees the algorithm terminates.

    Check answer

    Answer: Four 90° rotations total 360°, so the shape returns to its starting position. The fixed repeat count of 4 is the termination condition.

    Hint: Represent the information first, then calculate, interpret and independently check the result.

    Why: This synthesis problem combines the chapter's core representation, calculation and reasoning skills.

Practice and reviewReady for practice

Common mistake: The instruction 'rotate the triangle' is precise enough for a computer or another person to follow.

Correction: A rotation must specify the centre, angle, direction and which image is rotated.

Common mistake: A repeated geometric process will stop when the design looks finished.

Correction: A reproducible algorithm needs a measurable stopping condition such as an image count.

Common mistake: Testing only the first iteration proves that an algorithm works for all later iterations.

Correction: Later values can trigger a different branch or reveal a faulty loop, so boundary and stopping cases must also be traced.

Curriculum alignmentStart here

We are learning to design precise spatial algorithms that use ordered steps, decisions, repetition and stopping conditions.

A spatial algorithm is a finite set of precise instructions for constructing, transforming or navigating a geometric object. Its input and coordinate system must be stated, and a translation needs a vector, a reflection needs a mirror line, and a rotation needs a centre, angle and direction.

Iteration repeats a defined block of steps, but the algorithm must say whether each new transformation acts on the original object or the latest image. A counter or geometric condition controls repetition, and a stopping condition prevents an endless loop or an unwanted duplicate image.

Decision branches make the next action depend on a test such as whether a point lies inside a boundary. A reliable algorithm gives an action for every possible result, can be traced manually on a small input, and produces the same output whenever the same input and conditions are used.

Success criteria

  • I can state the input, transformation details and order of steps in a reproducible spatial algorithm.
  • I can trace iterations and decision branches to predict an algorithm's geometric output.
  • I can identify ambiguity or a faulty stopping rule and repair the algorithm.
Teach & ExplainTeaching slides and samples

Teach this topic step by step

Explore optional teaching slide packs for classroom lessons and explanations at home.

Browse Teach & Explain · Browse Print & Go

Teachers: follow SkillrHub on TPT, then email us to request a free sample before buying. Include the year, subject and topic or curriculum code.

Request a free sample

After trying the sample, honest feedback is welcome. A TPT review is optional, where available, and does not need to be positive.