Mastering Scratch Pen Blocks Tutorial: Draw Shapes in Scratch with Code

Block Programming

Introduction: Scratch Pen Blocks

Welcome to Kodex Academy's deep dive into Scratch drawing tutorial! In this post, we'll explore how to use pen blocks in Scratch, demonstrate hands-on Scratch geometry project workshops, and empower you to draw shapes in Scratch using clean, loop-based code.

Along the way, we'll optimize for search terms like Scratch pen block shapes, Scratch draw square and circle, Make shapes in Scratch using code, Shape maker in Scratch, and many more—all while delivering high educational value.

What You'll Learn

Here's what we'll cover in detail:

  1. Master visual programming with Scratch pen blocks for algorithmic drawing.
  2. Enabling Pen Blocks in Scratch 3.0
  3. Choosing & customizing sprites
  4. Drawing basic shapes: square, circle, pentagon, hexagon, rectangle
  5. Creating reusable shape functions
  6. Comparing code styles: explicit loops vs. abstraction
  7. Advanced drawing techniques: spirographs, interactive color sliders, stitch effects
  8. Educational value & teaching strategy

Why for Beginners

1. Visual Feedback Builds Confidence

Scratch's block interface removes syntax barriers. When learners drag a "move" or "pen down" block, they immediately see the result on-screen. Drawing a square by combining motion and loops helps kids understand geometry through doing, not just through formulas.

2. Core Programming Concepts

Working with pen blocks introduces essential ideas:

  • Variables (e.g. pen size, shape sides)
  • Loops (e.g. repeat 4 times for a square)
  • Angles and Rotation (turning 90°, 60°, etc.)
  • Functions & Abstraction (custom shape blocks)

These mirror real coding skills in JavaScript, Python, and more, making Scratch a gateway to future learning.

3. Low Threshold, High Ceiling

A six-year-old can draw a square, while high schoolers can generate spirographs or interactive tools. The same pen tool scales from simple to sophisticated.

4. Math Enrichment

Drawing shapes helps learners understand perimeter, interior and exterior angles, circle approximation (360° ÷ segments), and relationships between sides and angles.

Project Coding – Step by Step guide

1. Scratch Pen Extension Tutorial: Enable Pen Blocks for Drawing

  1. Open Scratch 3.0 editor.
  2. Click Extensions at the bottom-left.
  3. Choose Pen from the gallery.
  4. The Pen palette appears, featuring blocks like `pen down`, `erase all`, `set pen color`.

This gives easy access to Scratch pen blocks tutorial and the foundation for Draw shapes in Scratch projects.

2. Scratch Sprite Customization: Choose Sprite for Pen Drawing

  • Remove the default cat sprite by right-clicking and deleting.
  • Add a sprite like "Pencil" or "Arrow" through the sprite library.
  • Resize it to around 80 for balanced visibility.

Why this matters: the sprite visually indicates direction ("forward"), so when your code says "move," the sprite's head shows where lines will be drawn.

3. Scratch Canvas Clearing: Erase All for Clean Pen Drawings

Before you draw each new shape, reset the stage using:

when green flag clicked
erase all

This ensures clean output for every run and avoids confusing overlapping drawings. It's best practice for Use pen block in Scratch 3.0 projects.

Scratch Drawing Tutorial: Shapes

1. › Scratch Square Drawing Tutorial: Create Square with Pen Loops

when [space v] key pressed
pen down
repeat (4)
  move (100) steps
  turn cw (90) degrees
end

Explained:

  • Repeat 4: four sides of the square
  • Move 100: length of each side
  • Turn 90°: right angle

Result: pressing the Space key draws a clean square. This forms the basis of your Scratch draw square and circle repertoire.

2. 🔵 Scratch Circle Drawing Guide: Approximate Circle with Turns

when [space v] key pressed
pen down
repeat (36)
  move (15) steps
  turn cw (10) degrees
end

Explanation:

  • Repeat 36: number of line segments
  • Turn 10°: this approximates a full circle (360° ÷ 36)
  • Move 15: controls the radius

This simple method allows kids to Draw shapes in Scratch that look curved—and it's a great way to discuss how polygons approximate circles.

🎥 Want to see how it's done? – Jump to Draw a Circle in Scratch in the video

3. Scratch Polygon Drawing: Create Pentagon with Loops and Angles

when [space v] key pressed
pen down
repeat (5)
  move (100) steps
  turn cw (72) degrees
end

Explanation:

  • Repeat 5: five sides
  • Turn 72°: 360° ÷ 5

This program is a key example of Pentagon drawing in Scratch and reinforces angle calculations.

🎥 Want to see how it's done? – Jump to Draw a Pentagon in Scratch in the video

4. 🔷 Scratch Hexagon Tutorial: Draw Hexagon Using Repeat Blocks

when [space v] key pressed
pen down
repeat (6)
  move (80) steps
  turn cw (60) degrees
end

Explanation:

  • Repeat 6: six sides
  • Turn 60°: 360° ÷ 6

Your hexagon emerges easily—ideal for Scratch pen block shapes practice and modular code learning.

🎥 Want to see how it's done? – Jump to Draw a Hexagon in Scratch in the video

5. ▬ Scratch Rectangle Drawing: Build Rectangle with Custom Code

when [space v] key pressed
pen down
repeat (2)
  move (150) steps
  turn cw (90)
  move (100) steps
  turn cw (90)
end

Explanation:

  • Repeat 2: covers all four sides in two repeating patterns
  • Move 150 and Move 100: differentiate side lengths
  • Turn 90°: ensures right angles

This snippet teaches Draw rectangle in Scratch using loops effectively.

🎥 Want to see how it's done? – Jump to Draw a Rectangle in Scratch in the video

Reusable Shape Maker Block

Scratch Custom Shape Maker: Build Reusable Pen Drawing Blocks

Synthesizing these examples, we can create a versatile tool—a custom block for any polygon:

define draw polygon (sides) (length)
pen down
repeat (sides)
  move (length) steps
  turn cw (360 ÷ sides) degrees
end

Scratch Pen Usage Example: Apply Custom Blocks for Shapes

when [space v] key pressed
erase all
draw polygon (7) (60) // heptagon

This makes Make shapes in Scratch using code simple and scalable. Once students grasp this, they can build stars, tessellations, and even fractals.

Code Styles Compared

Code Style Benefits
Explicit shape script Great for concept learning & clarity
Custom shape maker block Clean, scalable, reuses code

By comparing the two, learners understand why structured code matters—leading to better computational thinking skills.

Draw Anywhere with a Graphics Tablet!

You just mastered Pen blocks – now imagine drawing your own sprites and shapes on a real screen, even away from the computer! These standalone tablets come with a pen and work perfectly with Scratch (and thousands of other art apps).

Advanced Drawing Techniques

1. Scratch Spirograph Tutorial: Create Patterns with Nested Loops

Create a spirograph by nesting your shape code in a loop and rotating slightly each time:

when green flag clicked
erase all
pen down
set pen color to [#FF00FF]
repeat (36)
  draw polygon (6) (50)
  turn cw (10)
end

This results in beautifully layered hexagons—an example of Scratch draw geometric shapes artistry.

2. Scratch Interactive Sliders: Control Pen Drawing with Variables

Introduce user input with the "ask" block and pen controls:

when green flag clicked
erase all
ask [How many sides?] and wait
set [sides v] to answer
ask [Length of each side?] and wait
set [length v] to answer
ask [Pen color? (e.g., red)] and wait
set pen color to (answer)
draw polygon (sides) (length)

Now you're building a custom Shape maker in Scratch that adapts to user input—ideal for classroom exploration.

3. Scratch Freehand Drawing App: Build Painting Tool with Pen Blocks

Let users draw by dragging the mouse! This uses event logic and conditional pen control:

when green flag clicked
erase all
pen up
forever
  go to mouse-pointer
  if  then pen down
  else pen up
end

This tool introduces students to event loops and interactivity—vital coding skills beyond geometry.

Lesson Planning & Educational Tips

  1. Pair coding + drawing: Begin with square building, then gradually introduce angles and formulas.
  2. Relate shapes to everyday items: Squares = windows, hexagons = honeycomb—this aids retention.
  3. Encourage experimentation: What happens when moving 200 px instead of 100? What changes with 8 sides?
  4. Use color and thickness: `set pen color to` and `set pen size to` blocks deepen the aesthetic learning.
  5. Project-based assessments: Have students create a logo using polygons—showcase stage-ready creations.
  6. Tie to math objectives: Cover angle sums, circle segments, and ratio through code—seamlessly integrate coding and geometry lessons.

Steps Summary

Draw Shapes in Scratch Using Pen Blocks

Step-by-step: Enable Pen, customize sprites, draw square/circle/pentagon, create custom blocks, and advanced spirographs.

Total Time: 30 minutes

  • Enable Pen Blocks: Click Add Extension > Pen; use 'pen down' and 'erase all' to start drawing.
  • Choose & Customize a Sprite: Add arrow sprite, resize to 150%, set direction to 90 degrees.
  • Draw a Square: Repeat 4 times: Move 100 steps, turn 90 degrees.
  • Approximate a Circle: Repeat 36 times: Move 10 steps, turn 10 degrees.
  • Create Reusable Custom Block: Define 'draw shape' with sides/angle inputs; call with parameters.
  • Advanced: Spirograph Patterns: Nest loops with varying turns for hypnotic designs.

Final Thoughts

FAQ: Frequently Asked Question

Question Answer
How to enable Pen blocks in Scratch? Click the blue "Add Extension" button (bottom-left) → choose "Pen" → green Pen blocks appear instantly!
How to draw a square in Scratch with Pen? Repeat 4 times: move 100 steps → turn right 90 degrees. Simple & perfect square every time!
How to draw a circle in Scratch? Repeat 36 times: move 10 steps → turn right 10 degrees (or 360 times with 1 step & 1 degree for smoother circle).
How to draw a pentagon or hexagon in Scratch? Use custom block with "sides" and "360/sides" angle. Pentagon = 5 sides & 72°, Hexagon = 6 sides & 60°.
What are custom blocks in Scratch Pen? Reusable code chunks! Define "draw shape" once with sides & angle inputs → call it for any polygon.
How to make a spirograph in Scratch? Nest two repeat loops: draw a small shape → turn 1–5 degrees → repeat 200–360 times = hypnotic patterns!
How to add sliders to control Pen drawing? Create variables (size, sides, angle) → right-click → "show slider" → change values live while drawing!
Best age for Scratch Pen blocks projects? Ages 8–14. Younger kids love colorful shapes; older kids explore math & spirographs.
How to draw with a drawing tablet in Scratch? Use any USB tablet (Wacom One or Huion) → draw custom sprites or freehand with the tablet pen!

Call to Action

  1. Remember to revisit the video tutorial: "Make Cool Shapes with Scratch Pen Blocks – Step-by-Step Guide" by Kodex Academy, and leave comments there with ideas or requests for your next Scratch drawing shapes project.
  2. Like, comment & share the video
  3. Visit kodexacademy.com
  4. subscribe to the Kodex Academy YouTube channel for deeper Scratch content.

Happy coding and drawing with Kodex Academy! see you in your next creative adventure! 🚀

Learn More with Kodex Academy

At Kodex Academy, we're passionate about helping students learn coding in creative ways. This project teaches more than Scratch—it empowers young minds to build tools that work in the real world.

Explore more:

  • 💻 Scratch Blogs
  • 🧠 Block Programming Course
  • 🎓 Scratch Udemy Course

Stay updated with new content, free tutorials, and coding challenges!

  • 🌐 Kodex Academy Blogs
  • 🐦 Twitter
  • 🔗 LinkedIn
  • 📸 Instagram
  • 💬 WhatsApp Channel
  • 🔗 LinkedIn