Skip to main content
logo
Forgotten your username or password?
Home
  • English ‎(en)‎
    • English ‎(en)‎
    • Español - Internacional ‎(es)‎
    • Français ‎(fr)‎
    • Türkçe ‎(tr)‎
    • Ελληνικά ‎(el)‎
    • Module 7

      Draw with Code!

      Discover Programming through Geometric Shapes

      Module Identity

      Title
      Draw with Code! - Discover Programming through Geometric Shapes
      Subject Areas
      Computer Science Mathematics Technology
      Format
      Visual programming with FOSSBot, hands-on drawing activities, geometric pattern creation, interactive H5P hotspots, collaborative debugging, inquiry-based exploration, gamified challenges
      Teacher Preparation Time
      30-45 minutes (includes FOSSBot network setup, preparing drawing materials, testing pencil holder attachment)
      Required Lesson Time
      45 minutes
      Age Range
      13-15 years (Grades 7-9, Junior High School)
      Keywords
      Computational Thinking, Visual Programming, Geometric Shapes, Loops, Sequences, Angles, Robotics, Physical Computing, Pattern Recognition, Debugging, Iteration, FOSSBot Drawing, Algorithm Design
      Summary

      This creative module transforms abstract programming concepts into tangible artistic expressions by teaching students to code through drawing geometric shapes. Using FOSSBot equipped with a pencil holder, students watch their algorithms come to life as the robot physically draws squares, triangles, hexagons, and even pentagrams on paper. The module brilliantly connects mathematical understanding of angles and geometry with computational thinking, as students discover that a square requires four 90-degree turns while a triangle needs three 120-degree turns. Through progressive activities, learners move from manual repetition of commands to elegant loop structures, experiencing firsthand how programming efficiency improves code. The inquiry-based approach encourages experimentation—students debug imperfect shapes, adjust angles, and iterate their solutions collaboratively. By making programming visual and artistic, this module removes the abstraction barrier that often intimidates beginners, replacing it with the immediate satisfaction of seeing their code produce beautiful geometric patterns.

      Introduction

      Programming education often begins with abstract concepts that can feel disconnected from the physical world, leaving students wondering about the practical applications of their code. This module revolutionizes that approach by turning code into art, algorithms into drawings, and loops into geometric patterns. When a student programs FOSSBot to draw a perfect square, they're not just learning syntax—they're discovering the mathematical elegance underlying both programming and geometry.

      The genius of this approach lies in its immediate visual feedback system. Unlike traditional programming where errors might produce cryptic messages, here mistakes create amusing artistic "failures"—a triangle with incorrect angles becomes a spiral, a miscalculated square becomes an abstract design. These visual mistakes are far more instructive than error messages because students can literally see where their logic went wrong. When a student programs "forward 10cm, turn 60°" expecting a triangle corner but sees the wrong angle drawn, the geometric-algorithmic connection becomes crystal clear. This tangible debugging process transforms frustration into curiosity and errors into learning opportunities.

      The progression from explicit commands to loop structures mirrors how professional programmers optimize code. Initially, students might write "forward-turn-forward-turn-forward-turn-forward-turn" to create a square, feeling the redundancy in their fingers as they type. When they discover the repeat loop and condense this to "repeat 4 times: forward-turn," they experience the same "aha!" moment that drives real software optimization. The module's culminating challenge—drawing a pentagram—requires students to calculate that each point needs a 144° turn, combining geometric reasoning with programming logic. By the session's end, students haven't just learned to code; they've discovered that programming is a creative tool for expressing mathematical beauty, setting a foundation for viewing coding as an artistic and problem-solving medium rather than merely a technical skill.

      Basic Knowledge

      • • Familiarity with visual programming environments (block-based coding)
      • • Understanding of basic movement concepts (forward, backward, turn)
      • • Knowledge of rotation angles and degrees (90°, 180°, 360°)
      • • Ability to identify basic geometric shapes and their properties
      • • Understanding of shape properties (number of sides, internal angles)
      • • Basic understanding of sequences and step-by-step instructions

      Learning Outcomes

      By the end of this module, students will be able to:

      Programming & Computational Skills

      • ✓ Use a visual programming interface to control robot movements
      • ✓ Program the robot to draw simple geometric shapes (square, triangle, hexagon)
      • ✓ Understand and apply loops to optimize repetitive code
      • ✓ Create and modify sequences of commands
      • ✓ Debug and improve code for more precise drawings

      Mathematical & Geometric Understanding

      • ✓ Translate geometric knowledge into algorithmic instructions
      • ✓ Apply angle-based logic to create specific shapes
      • ✓ Calculate correct rotation angles for different polygons
      • ✓ Understand the relationship between shape sides and turning angles
      • ✓ Draw complex shapes like pentagrams using calculated angles (144°)

      Problem-Solving & Creative Skills

      • ✓ Recognize patterns in repetitive instructions
      • ✓ Develop creativity through geometric pattern design
      • ✓ Test and iterate solutions through experimentation
      • ✓ Collaborate to solve drawing challenges
      • ✓ Apply logical thinking to optimize program efficiency

      📐 Geometric Shapes & Angles Reference

      Shape Sides Turn Angle Loop Iterations
      Square 4 90° 4
      Triangle 3 120° 3
      Hexagon 6 60° 6
      Pentagram ⭐ 5 144° 5
  • Download Lesson Plan
  • Evaluation
Close shade box
Previous section
Next section
  • Download Lesson Plan

    • Download Lesson Plan (EN) File
    • Download Lesson Plan (ES) File
    • Download Lesson Plan (FR) File
    • Download Lesson Plan (GR) File
    • Download Lesson Plan (TR) File
    • Draw with FOSSBot - Introduction File
  • Evaluation

    • d

 
Back

The European Commission support for the production of this website does not constitute an endorsement of the contents which reflects the views only of the authors, and the Commission cannot be held responsi­ble for any use which may be made of the information contained therein.

You are currently using guest access (Log in)