Geometry with Swift Playgrounds
In this course your students will learn the fundamentals of Swift 3 programming, using Geometry as their context for learning. The style of this course mimic "Logo", which is an educational programming language designed in 1967 by Daniel Borrow, Wally Feurzeig, Seymour Papert and Cynthia Soloman.
Today the language is remembered mainly for its using of turtle graphics, in which commands for movement and drawing produce line art on screen. I have used turtle extensively with the Python language and I see it as an essential building block for teaching students coding and debugging. I have also replicated the exercises utilising the Hopscotch coding app, however, with swift students have no metaphorical roof to their learning, they can go from drawing triangles to creating award winning apps within their high school career.
This course utilises the Core Graphics to draw low-level, lightweight 2D rendering of shapes and allows us to give the visual stimulus necessary for teaching geometry. The Core Graphics framework handles path-based drawing, transformations, colour management, offscreen rendering, patterns, gradients and shading, image data management, image creation, masking and PDF document creation, display and parsing.
For more information related to the Core Graphics Framework, visit the Apple Documentation.
Level of Difficulty
The course is suitable for beginners and teaches mathematics concepts which are applicable for students from Year 5 to Year 7 (based on the Australian Curriculum). The course is designed to scaffold learning and present problems which students need to find solutions to. For example, students will be told to draw a shape, but won't be told what angles or lengths are necessary to achieve it. Through the course students will be introduced extensively to Loops and Functions.
I have delivered this course to students ages between 12-16 years old with good results.
The course is designed to be very visual and get students creating rather then reading and learning about the theoretical element of coding. Additional reading, video and support material are provided to the supplement the challenges.
The challenges themselves within the course are designed to be slightly ambiguous to encourage students to ask intelligent questions, research solutions and scaffold their learning. It's not designed to be a tutorial.
Within Getting Started the students are taught the basics of how to draw and render a shape on the page. They are shown how to create Squares, Rectangles and Triangles using sequential commands which are then added as a path to a shape.
In the Fancy Pictures topic students are taught some additional commands which allow them to add colour and line thickness to their patterns. They are also taught how to draw multiple shapes and move the pen without drawing a line.
Doing Stuff Again
Doing Stuff Again is all about Loops. Students identify the inefficiencies with their code and how they can utilise both For-Loop and While-Loops to avoid code duplication. Students are also introduced to the co-ordinates system which allows them to draw more accurate shapes and begin to consider transformations.
Tell It How
In the Tell It How topic students are introduce to functions and how they can be used to define a shape and how we can implement parameters to control the size, position and colour of the shapes we are drawing.
Finally in the Suburban Scene students apply their knowledge to create a colourful image of layered shapes representing a Suburban Scene.
Accessing the Materials
All of the materials for this course are available through iTunesU and are publicly available under Creative Commons should you wish to re-use them for your own lessons. I appreciate and encourage any feedback and constructive criticism so I can improve the courses.
Geometry with Swift Playgrounds (CoreGraphics) - https://itunesu.itunes.apple.com/enroll/CYW-XJD-CFA
- Swift Playground File