-
Notifications
You must be signed in to change notification settings - Fork 1
Teaching Chapter II
Teacher-facing notes for running Chapter II in class.
| Sections | 21 (3 tutorials, 18 exercises) |
| Estimated time | 3 weeks for a mixed-ability Year 9 class (12 to 15 lessons) |
| Prerequisites | Chapter I finished. Students must be comfortable with the Pen API, exterior angles, and the walking metaphor. |
| Live chapter | dbbudd.github.io/02.html |
Students leave able to: store values in variables and reuse them, draw with multiple pens simultaneously, recognise lines of symmetry, derive and apply the area of composite polygons using inclusion and exclusion, and classify quadrilaterals by their properties.
The mathematics. Shape properties beyond the basic regular polygons. Lines of symmetry (both reflective and rotational). Parallelograms, rhombuses, and irregular polygons. Area by decomposition: splitting a cross or a house into rectangles and triangles, then summing the pieces. Parallel lines, alternate interior angles (Z-angles), and the insight that equal turns produce parallel sides.
The programming. Variables using let and var. The distinction between a constant (let) and a mutable variable (var). Multiple pen instances drawing on the same canvas. Colour and fill as properties of the pen (penColor, fillColor, lineWidth). Calculation-driven geometry: using arithmetic inside variable assignments so that one edit propagates through the whole shape.
Chapter II is the longest chapter in the curriculum (21 sections) and the most content-dense. It splits roughly into thirds.
Sections 1 to 9 are about multiple pens, colour, and fill. Adding Pens (tutorial), Multiple Pens, Turning Both Ways (tutorial), Two Squares, Thicker Lines, Coloured Triangle, Diamond, Fill It In (tutorial), Coloured Squares. The maths is light here. The goal is to get students comfortable with having more than one pen on the canvas, and to introduce fill as a distinct concept from stroke. The Diamond exercise (section 7) introduces alternating turn angles, which foreshadows the rhombus and parallelogram sections later.
Section 10 (Variables) is the pivotal tutorial. This is where let and var are introduced and the student learns that a stored value can be used in many places. Everything after section 10 leans on variables. If students are still writing raw numbers after section 10, they haven't grasped the idea.
Sections 11 to 14 apply variables to increasingly complex shapes: House, Calculate, Variable House, Red Cross. The Calculate section (12) is where students first do arithmetic inside their variable assignments ("roof slope is 100 divided by root 3, approximately 57.74"). The Red Cross introduces inclusion and exclusion area calculation.
Sections 15 to 21 are advanced shape work: Simple Snowflake, Parallel Lines, Letter Z, Rhombus, Parallelogram, Polygon Explorer, Angle Classification. This is where the chapter's maths gets heaviest. Parallel Lines and Letter Z teach alternate interior angles. Rhombus and Parallelogram teach the properties of quadrilaterals beyond rectangles. Polygon Explorer and Angle Classification are drawing-observation exercises that preview Chapter IV's classification work.
The idea that a variable lets you store a value once and use it everywhere. This is not just a coding trick; it's the gateway to algebraic reasoning applied to geometry. A student who internalises this leaves Chapter II able to write:
let side = 100
let diagonal = side * 1.414and understand that changing side = 100 to side = 150 rescales the whole shape. That insight is the direct precursor to similarity (Chapter V) and functions with parameters (also Chapter V). If they leave Chapter II still writing 100 in 14 places, they'll struggle with parameterised functions.
Students sometimes treat let side = 100 as a typing convenience: a short word to replace a number. They miss the point that the variable can be computed (let diagonal = side * 1.414) and that changing the source propagates through every use.
Fix: the Calculate exercise (section 12) is specifically designed to fix this. Work through it on the board. Have students predict what happens when you change the side length at the top, then reveal the cascade.
They aren't. let is a constant (reassignment is an error); var is mutable. Use this to teach a programming culture point: prefer let unless you explicitly need to change the value later. This matches Swift's own style guide and gets students into the habit of marking things as immutable by default.
Fix: challenge students to use let everywhere, and only change to var when the compiler forces them. Turn it into a game.
They don't. Each pen is an independent object with its own colour, fill, and line width. Two pens on the same canvas can draw in different colours. Students sometimes try to set a colour once and expect it to apply to all pens.
Fix: the Adding Pens tutorial (section 1) establishes this, but it's worth reinforcing with a quick three-pen demo on the board. Say "each pen is like a different marker in your hand".
Students will question this. It's the result of 100 / tan(60°) for an isosceles triangle roof with a 30 degree slope, and it's approximately 100 / 1.732 = 57.74. The curriculum explains this with a blockquote. If students ask, reinforce the reasoning rather than just waving it away. This is a great moment to plant the seed that geometry and trigonometry are connected.
Red Cross (section 14) teaches area by inclusion and exclusion: add the two rectangles, subtract the overlap counted twice. Students sometimes see this as a one-off trick for cross shapes. It isn't. It's a general technique that reappears in Chapter VI.
Fix: when you reach section 14, generalise out loud: "any time two shapes overlap, this is how you find the total area."
Before teaching section 10 (Variables), spend five minutes showing students what it's like to write a 10-line program with the number 100 appearing seven times. Then say "I've changed my mind, make it 150", and watch them hunt through the code replacing numbers. The pain is the motivator. Then introduce let.
When introducing variables, emphasise that good code has one source of truth for each value. If a number appears twice, it should probably be a variable used twice. This is a real software engineering principle and it's the same reason shape drawings in Geometry Playground work the way they do.
The House exercise (section 11) is where variables stop being theoretical. Spend a full lesson on it. The house has a specific width, a specific height, a specific roof slope, and all of them should be variables so that editing one changes the drawing coherently. By the end of the lesson, every student should have a parameterised house that they can resize by changing one line.
The Letter Z exercise (section 17) is your opportunity to name alternate interior angles (Z-angles) as a formal maths concept. Drop the phrase "alternate interior angles" casually while students work on it. They will remember it in Year 10 when they meet it again formally.
Section 14: Red Cross. Two reasons:
- The shape requires thinking about overlap, which is new. The first time a student realises that adding the area of both rectangles double-counts the middle, something visibly clicks.
- The arithmetic gets painful fast. Students need to write expressions like
2 * width * height - (overlap_w * overlap_h)and trace through them carefully.
How to teach it: draw the cross on the whiteboard. Label every region. Ask "if I told you the total area by adding both rectangles, what have I counted twice?" Let a student come up and shade the double-counted region. Then write the formula.
- A Union Jack. Stupidly hard using only Chapter II techniques (no functions yet). Fast finishers will try it; most will give up; a few will succeed and be proud. This is fine.
- A tangram. Seven specific shapes that fit together to form a square. Great for testing variable and coordinate understanding.
-
A parameterised polygon. Write a program that takes
sidesas a variable and tries to draw a regular polygon. Students who solve this without a loop are set up perfectly for Chapter III. - A snowflake with more arms. The Simple Snowflake section gives a six-arm template. Ask for a twelve-arm version.
Before introducing variables (just before section 10):
"I'm going to change my mind. Instead of side length 100, make it 150. Find every 100 in your code and change it. Let me know when you're done."
(Watch them groan. Then:)
"There's a better way. What if you could write 100 in one place, and every other part of the code that used it just worked? That's what a variable is."
When a student uses var unnecessarily:
"Swift has two keywords:
letmeans 'this value never changes' andvarmeans 'this value might change later'. You wrotevarbut you never change this value. Useletinstead. It's stricter, which means the computer can help you catch mistakes."
When introducing multiple pens (section 1):
"You've been using one pen. You can have as many as you like. Each one has its own position, its own direction, its own colour, its own line width. Think of them as different markers you pick up from a drawer."
When explaining Z-angles (section 17):
"When a line crosses two parallel lines, the angles it makes on opposite sides are equal. You can see this with the letter Z: the top angle and the bottom angle are the same size. This has a formal name in maths, and you'll meet it again in Year 10. It's called alternate interior angles, or sometimes Z-angles."
Fill this section in after your first classroom run.
- Chapter II on the live site
- Previous: Teaching Chapter I
- Next: Teaching Chapter III
- Up: Home
Geometry Playground · a Swift Playgrounds curriculum for high school geometry · dbbudd.github.io · built by Daniel Budd