{"id":20640,"date":"2023-07-17T08:51:49","date_gmt":"2023-07-17T15:51:49","guid":{"rendered":"https:\/\/www.tynker.com\/blog\/?p=20640"},"modified":"2023-09-11T13:19:12","modified_gmt":"2023-09-11T20:19:12","slug":"tynker-toolbox-the-pen-blocks","status":"publish","type":"post","link":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/","title":{"rendered":"Tynker Toolbox: The Pen Blocks"},"content":{"rendered":"\n<p>Did you know that you can use Tynker to create colorful, original drawings? This complex, spiraling image was created with just a handful of code blocks using Tynker\u2019s Pen.&nbsp;<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"426\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084202\/spirals-art-spirals-1024x426.png\" alt=\"A colorful spiral next to the program that generated it. The program moves and turns the pen in a loop to create the effect. \" class=\"wp-image-20724\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084202\/spirals-art-spirals-1024x426.png 1024w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084202\/spirals-art-spirals-150x62.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084202\/spirals-art-spirals-300x125.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084202\/spirals-art-spirals-768x319.png 768w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084202\/spirals-art-spirals-1280x532.png 1280w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084202\/spirals-art-spirals.png 1900w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>To use the Pen Blocks, you must <em>enable <\/em>them first. You\u2019ve got two options.&nbsp;<br><\/p>\n\n\n\n<p><strong>Option #1:&nbsp;<\/strong>Drag any Pen block in your code, and the extension will automatically be enabled! Search for a Pen command like <strong>pen down<\/strong> or <strong>set pen size<\/strong> and use it in your code.&nbsp;<br><\/p>\n\n\n\n<p><strong>Option #2:&nbsp;<\/strong>You can also click <strong>More <\/strong>at the bottom of the coding palette, then choose <strong>Pen <\/strong>and <strong>Add<\/strong> to enable the Pen blocks.<\/p>\n\n\n\n<p>With the Pen blocks enabled, as actors move across the Stage, they can draw lines, shapes, and much more.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084216\/turtle-1024x159.png\" alt=\"A turtle draws on the Stage, leaving behind pen marks, to demonstrate the big idea of Tynker's Pen Blocks \" class=\"wp-image-20725\" width=\"512\" height=\"80\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084216\/turtle-1024x159.png 1024w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084216\/turtle-150x23.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084216\/turtle-300x46.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084216\/turtle-768x119.png 768w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084216\/turtle-1280x198.png 1280w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Tynker\u2019s Pen is inspired by Logo, an educational programming language created in the late 1960s. Logo&nbsp;was used to control robotic turtles (yes, really!) that could draw with pens. In Tynker, we\u2019ll move virtual turtles and draw on the screen instead. The <strong><a href=\"https:\/\/www.tynker.com\/courses\/python-1-jungle-run-adventure\">Python<\/a><\/strong> programing language has a similar pen-drawing tool called <strong>Turtle Graphics<\/strong>.<\/p>\n\n\n\n<p>This tutorial and the Pen blocks themselves are both inspired by and indebted to Logo and the pioneering computer scientist and educator Seymour Papert. His book <strong><a href=\"https:\/\/mindstorms.media.mit.edu\/\">Mindstorms<\/a><\/strong> (1980) and video lecture series <strong><a href=\"https:\/\/el.media.mit.edu\/logo-foundation\/resources\/onlogo\/index.html\">On Logo<\/a> <\/strong>(1986) are still relevant today. Both are available for free online and recommended reading for computer science educators.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a1cc2161f7d1\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #206be5;color:#206be5\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #206be5;color:#206be5\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a1cc2161f7d1\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#Drawing_Simple_Shapes\" >Drawing Simple Shapes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#Repeating_Code\" >Repeating Code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#Wait_a_Second_Whats_An_Angle\" >Wait a Second: What\u2019s An Angle?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#Whats_A_Circle\" >What\u2019s A Circle?&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#Try_Driving_Your_Turtle\" >Try Driving Your Turtle<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#Drawing_Shapes_and_Text\" >Drawing Shapes and Text<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#Explore_Functions_with_Pen_Blocks\" >Explore Functions with Pen Blocks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#Parameterized_Functions_Are_We_Having_Fun_Yet\" >Parameterized Functions: Are We Having Fun Yet?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#Pen_Block_Magic\" >Pen Block Magic<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#What_Next\" >What Next?&nbsp;<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Drawing_Simple_Shapes\"><\/span>Drawing Simple Shapes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Let\u2019s start with some simple shapes like these to get the idea:&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141036\/turtle-shapes.png\" alt=\"Three shapes are drawn by the turtle: A square, triangle, and five-sided star\" class=\"wp-image-20644\" width=\"512\" height=\"410\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141036\/turtle-shapes.png 1023w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141036\/turtle-shapes-150x120.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141036\/turtle-shapes-300x240.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141036\/turtle-shapes-768x616.png 768w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><figcaption class=\"wp-element-caption\"> <br><strong><em>About Turtles:<\/em><\/strong><em> I\u2019m moving around a Turtle actor, but you can use any actor as your Pen. Add an actor or draw your own (<strong>Add Actor &gt; Media Library<\/strong> or <strong>Add Actor &gt; Drawing Tool<\/strong>). You can change the size of your actor with the <strong>set size <\/strong>block.  <\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p>To start drawing with an actor, use the <strong>pen down <\/strong>command. As the actor moves on the Stage, it will leave a trail behind it. Try reading this code first:&nbsp;<br><br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141141\/simple-square-294x1024.png\" alt=\"A redundant block code program to draw a square \" class=\"wp-image-20645\" width=\"147\" height=\"512\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141141\/simple-square-294x1024.png 294w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141141\/simple-square-43x150.png 43w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141141\/simple-square-86x300.png 86w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141141\/simple-square.png 322w\" sizes=\"auto, (max-width: 147px) 100vw, 147px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Try <strong>walking <\/strong>like a turtle before you run your code! Yes, stand up and get some exercise. Say these instructions aloud and act them out.&nbsp;<br><\/p>\n\n\n\n<p>Move forward 2 steps (unless you have enough room to take 200 steps!), turn right 90 degrees, then repeat it another 3 times. What shape did you walk? Try drawing it with pen and paper.&nbsp;<br><\/p>\n\n\n\n<p>Finally, run your code in Tynker and watch the actor move.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Repeating_Code\"><\/span>Repeating Code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We can organize our square-drawing code into a shorter program using a <strong>repeat <\/strong>loop.&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141211\/square.png\" alt=\"Drawing a square using a for loop \" class=\"wp-image-20646\" width=\"176\" height=\"219\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141211\/square.png 352w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141211\/square-121x150.png 121w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141211\/square-241x300.png 241w\" sizes=\"auto, (max-width: 176px) 100vw, 176px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>By changing the <strong>repeat <\/strong>count and the <strong>turn <\/strong>angle, we can draw a triangle or a star instead:&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084258\/triangle-star.png\" alt=\"A program that draws a triangle and a program that draws a star. \" class=\"wp-image-20726\" width=\"400\" height=\"220\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084258\/triangle-star.png 800w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084258\/triangle-star-150x83.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084258\/triangle-star-300x165.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084258\/triangle-star-768x422.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>You can also change the pen\u2019s <strong>width<\/strong>, <strong>color<\/strong>, and <strong>hue<\/strong>. Go ahead and experiment on your own with these commands. Try changing the color within loops and watch what happens!<br><\/p>\n\n\n\n<p>To remove pen drawings, you can use the <strong>clear <\/strong>block. Here\u2019s a short program that will clear the screen with a click.&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141249\/clear.png\" alt=\"A short program to clear the screen.\" class=\"wp-image-20647\" width=\"181\" height=\"92\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141249\/clear.png 361w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141249\/clear-150x76.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141249\/clear-300x153.png 300w\" sizes=\"auto, (max-width: 181px) 100vw, 181px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Wait_a_Second_Whats_An_Angle\"><\/span>Wait a Second: What\u2019s An Angle?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>That\u2019s a very important question. An angle describes the space between two lines that meet at a single location. Let\u2019s look at some angles of an actor\u2019s left turn:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"529\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200409084906\/diagram.png\" alt=\"An angle diagram showing a &quot;left turn.&quot; The degrees 30, 90, 120, and 180 are indicated\" class=\"wp-image-20745\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200409084906\/diagram.png 972w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200409084906\/diagram-150x82.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200409084906\/diagram-300x163.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200409084906\/diagram-768x418.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Angles are all around us, even in our day-to-day speech. Have you ever heard someone say, \u201cWell, that\u2019s a complete 180!\u201d when someone changes their mind? A 180 degree turn is flipping directions.&nbsp;<br><\/p>\n\n\n\n<p>Watch what happens when your actor turns 180 degrees in Tynker code blocks.&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141355\/back-and-forth180.png\" alt=\"A program that moves forward 100, turns 180 degrees, and moves forward once again\" class=\"wp-image-20648\" width=\"166\" height=\"248\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141355\/back-and-forth180.png 332w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141355\/back-and-forth180-100x150.png 100w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141355\/back-and-forth180-201x300.png 201w\" sizes=\"auto, (max-width: 166px) 100vw, 166px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Experiment with different turning angles to get the hang of it. Try negative angles like <strong>-90<\/strong>. Use both the <strong>turn left <\/strong>and <strong>turn right <\/strong>blocks.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Whats_A_Circle\"><\/span>What\u2019s A Circle?&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Could you use the pen to draw a circle? Try out this loop and watch what it does. Did your turtle draw a circle \u2026 or is it a <em>polygon<\/em>?&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141416\/circle.png\" alt=\"Drawing a 36 sided polygon\" class=\"wp-image-20649\" width=\"173\" height=\"219\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141416\/circle.png 346w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141416\/circle-118x150.png 118w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141416\/circle-237x300.png 237w\" sizes=\"auto, (max-width: 173px) 100vw, 173px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Make the turning angle in the loop smaller. <strong>Make a prediction<\/strong> before you run your code again: Will your circle get <strong>larger <\/strong>or <strong>smaller<\/strong>?&nbsp;<br><\/p>\n\n\n\n<p>Try changing the <strong>repeat <\/strong>count so that the Pen completes the circle. <strong>Hint: <\/strong>What\u2019s 36 \u00d7 10?&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Try_Driving_Your_Turtle\"><\/span>Try Driving Your Turtle<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Choose a background for the Stage, then navigate your new scene with your actor, with the <strong>pen down<\/strong>, so you can see where your actor goes. Use these three commands:&nbsp;&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084418\/turn-left-turn-right-move.png\" alt=\"The Turn Left, Turn Right, and Move blocks. \" class=\"wp-image-20728\" width=\"500\" height=\"50\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084418\/turn-left-turn-right-move.png 1000w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084418\/turn-left-turn-right-move-150x15.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084418\/turn-left-turn-right-move-300x30.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407084418\/turn-left-turn-right-move-768x77.png 768w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>You can double-click on the blocks to run them\u2014and move your turtle around. My turtle is now a Viking Ship making its way around the islands.&nbsp; Try changing the <strong>turn <\/strong>angles and how many pixels your Turtle moves.&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"498\" height=\"290\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141515\/vikingship.png\" alt=\"A viking ship navigating islands, leaving behind a yellow trail \" class=\"wp-image-20650\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141515\/vikingship.png 498w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141515\/vikingship-150x87.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141515\/vikingship-300x175.png 300w\" sizes=\"auto, (max-width: 498px) 100vw, 498px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Don\u2019t be afraid to crash into things. Turn around 180 degrees and go backwards if you have to. Just try to get a <em>feel <\/em>for angles and movement on the screen.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Drawing_Shapes_and_Text\"><\/span>Drawing Shapes and Text<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The pen blocks also include commands to make actors draw shapes, text, and much more. They can even clear shapes that have been drawn with the pen. Here are a few examples:&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141612\/shapes-text-lines.png\" alt=\"Program that draws text onto the screen.\" class=\"wp-image-20651\" width=\"361\" height=\"481\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141612\/shapes-text-lines.png 721w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141612\/shapes-text-lines-112x150.png 112w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141612\/shapes-text-lines-225x300.png 225w\" sizes=\"auto, (max-width: 361px) 100vw, 361px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Go ahead and explore with these blocks on your own.&nbsp;<br><\/p>\n\n\n\n<p>You can use these blocks to draw a whole city skyline with code. Or candy-colored polka dots!&nbsp;<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Explore_Functions_with_Pen_Blocks\"><\/span>Explore Functions with Pen Blocks<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Pen blocks are the perfect way to explore the idea of creating your own functions. Recall how we drew a square or star\u2014you can create a function that organizes that code into a little reusable package.&nbsp;<br><\/p>\n\n\n\n<p>First, create a new function by going to <strong>Functions &gt; Create Function<\/strong>. Name it \u201cDraw Star\u201d or whatever shape you\u2019ve chosen. Then <strong><em>define <\/em><\/strong>what you want your function to do, using code blocks:&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141703\/define-star.png\" alt=\"A block code program defining the Draw Star function\" class=\"wp-image-20652\" width=\"181\" height=\"258\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141703\/define-star.png 362w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141703\/define-star-105x150.png 105w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141703\/define-star-210x300.png 210w\" sizes=\"auto, (max-width: 181px) 100vw, 181px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Then you can <strong><em>call <\/em><\/strong>your new <strong>Draw Star <\/strong>function as many times as you like, and the code will run\u2014call your function only once or call it 50 times! Here are some examples you can try:&nbsp;<br><br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141813\/single-star.png\" alt=\"Calling the function: A simple on start, draw star program\" class=\"wp-image-20653\" width=\"108\" height=\"92\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141813\/single-star.png 216w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141813\/single-star-150x128.png 150w\" sizes=\"auto, (max-width: 108px) 100vw, 108px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141832\/call-star-basic-1024x305.png\" alt=\"Calling the Draw Star function in a randomly location, within a repeat 50 loop \" class=\"wp-image-20654\" width=\"512\" height=\"153\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141832\/call-star-basic-1024x305.png 1024w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141832\/call-star-basic-150x45.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141832\/call-star-basic-300x89.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141832\/call-star-basic-768x228.png 768w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141832\/call-star-basic-1280x381.png 1280w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401141832\/call-star-basic.png 1345w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>You can create a second function that fills the Stage with the color black. I called it <strong>Draw Space<\/strong>.&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142040\/draw-space.png\" alt=\"Defining the draw space function, \" class=\"wp-image-20655\" width=\"458\" height=\"180\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142040\/draw-space.png 915w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142040\/draw-space-150x59.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142040\/draw-space-300x118.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142040\/draw-space-768x302.png 768w\" sizes=\"auto, (max-width: 458px) 100vw, 458px\" \/><\/figure>\n<\/div>\n\n\n<p>You can even call functions from <strong><em>within <\/em><\/strong>another function. Let\u2019s try it!&nbsp;<br><\/p>\n\n\n\n<p>Create another function called <strong>Draw Starfield<\/strong>, and let\u2019s call both <strong>Draw Stars<\/strong> and <strong>Draw Space<\/strong> from within it. First, fill the screen with black using the <strong>Draw Space<\/strong> function, then switch to a white pen, then call the<strong> Draw Star<\/strong> function at 200 random locations!&nbsp;<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142115\/draw-starfield-1024x483.png\" alt=\"The Draw Starfield function calls both Draw Space and Draw Star. Functions are powerful ways of organizing your code!\" class=\"wp-image-20656\" width=\"512\" height=\"242\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142115\/draw-starfield-1024x483.png 1024w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142115\/draw-starfield-150x71.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142115\/draw-starfield-300x141.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142115\/draw-starfield-768x362.png 768w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142115\/draw-starfield-1280x603.png 1280w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142115\/draw-starfield.png 1345w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Don\u2019t forget to add a short program that calls your new <strong>Draw Starfield<\/strong> function to see it in action. Change it around and make it your own!<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142146\/starfield-call.png\" alt=\"Calling Draw Starfield \" class=\"wp-image-20657\" width=\"111\" height=\"92\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142146\/starfield-call.png 221w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142146\/starfield-call-150x125.png 150w\" sizes=\"auto, (max-width: 111px) 100vw, 111px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"586\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142158\/starfield-drawn-1024x586.png\" alt=\"A beautiful black starfield, covered with stars. The turtle draws the final star. \" class=\"wp-image-20658\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142158\/starfield-drawn-1024x586.png 1024w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142158\/starfield-drawn-150x86.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142158\/starfield-drawn-300x172.png 300w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142158\/starfield-drawn-768x439.png 768w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142158\/starfield-drawn-1280x732.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Parameterized_Functions_Are_We_Having_Fun_Yet\"><\/span>Parameterized Functions: Are We Having Fun Yet?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Are you seeing the truly <strong><em>incredible <\/em><\/strong>possibilities of code yet?&nbsp;<br><\/p>\n\n\n\n<p>You can use the Pen blocks to understand the idea behind parameterized functions, too. Notice the <strong>Length <\/strong>and <strong>Size <\/strong>parameters for our new <strong>Draw Square<\/strong> function. You can drag these parameters into the function definition code blocks\u2014we set <strong>pen size to Size <\/strong>and now <strong>move Length <\/strong>pixels. Then, when we call the function, we&#8217;ll specify how big we want the square to be and how wide the pen should be too.&nbsp;<br><\/p>\n\n\n\n<p>Give it a try! Define it. <br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142318\/parameter-func-def.png\" alt=\"A parameterized function \" class=\"wp-image-20659\" width=\"255\" height=\"327\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142318\/parameter-func-def.png 510w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142318\/parameter-func-def-117x150.png 117w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142318\/parameter-func-def-234x300.png 234w\" sizes=\"auto, (max-width: 255px) 100vw, 255px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Then call your function, describing the square you want to draw!<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142336\/parameter-func-call.png\" alt=\"Calling the square with arbitrary user-provided parameters 400, 100 \" class=\"wp-image-20660\" width=\"192\" height=\"92\" srcset=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142336\/parameter-func-call.png 384w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142336\/parameter-func-call-150x72.png 150w, https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200401142336\/parameter-func-call-300x144.png 300w\" sizes=\"auto, (max-width: 192px) 100vw, 192px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong><em>BTW.<\/em><\/strong> You can add parameters as you <strong>Create <\/strong>a function. But you can click on the pen \ud83d\udd8a in the function definition to add new parameters to an existing function, too.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Pen_Block_Magic\"><\/span>Pen Block Magic<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Want to get inspired? Give yourself a Pen block programming challenge. Check out the amazing artwork that these young programmers created using Tynker&#8217;s Pen blocks, with a limit of just <strong>20 code blocks <\/strong>total! Amazing stuff from the always-creative Tynker Community. <\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/www.tynker.com\/community\/galleries\/pen-block-magic\/63923e991d7f615a825df3f2\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Pen Block Magic!<\/strong><\/a><\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"540\" style=\"aspect-ratio: 678 \/ 540;\" width=\"678\" autoplay loop muted src=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20221129162133\/spin.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Next\"><\/span>What Next?&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Try imagining your own challenge with the pen and completing it. Can you use the pen tools to draw a face? A character? Or a landscape?&nbsp;<br><\/p>\n\n\n\n<p>Want a challenge? Explore <strong>Lazer Racer<\/strong>, a set of increasingly complex pen-drawing puzzles available with the <a href=\"https:\/\/apps.apple.com\/us\/app\/tynker-coding-for-kids\/id805869467\">Tynker App<\/a>.&nbsp;<br><\/p>\n\n\n\n<p>Want more Pen ideas? Check out these seasonal projects that use the Pen blocks: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.tynker.com\/ide\/v3?p=5e8d016ccebc0053d67e7f5c\">Rainbow Hearts<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/ide\/v3?p=5e8d02822f0323237d0bdac1\">Spiraling Shapes<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/ide\/v3?p=5e8d02e35e5485723668511a\">Spider Spin<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/community\/galleries\/draw-a-summerscape\/64caed7ed02d7560a47d09a1\/\" target=\"_blank\" rel=\"noreferrer noopener\">Explore these amazing kid-created Pen Projects, too!<\/a> These are the winners and notable contestants of Tynker&#8217;s <strong>Draw a Summerscape <\/strong>challenge.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>Share your own pen projects with us at <strong>community@tynker.com<\/strong><br><\/p>\n\n\n\n<p>Looking for more activities? Check out these <strong>Tynker Toolbox<\/strong> articles!<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.tynker.com\/blog\/tynker-workshop-basics\/\"><strong>Tynker Workshop Basics<\/strong><\/a> \u2014 Learn about coordinates and start coding with Tynker.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/animation-tool\/\"><strong>The Animation Tool<\/strong><\/a> \u2014 Learn about frame-based animation and other animation tips.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-character-creator\/\"><strong>The Character Creator<\/strong><\/a> \u2014 Take control of custom rigs using the Animation blocks.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/text-tricks\/\"><strong>Text Tricks<\/strong><\/a> \u2014 Work with speech bubbles and more. Tell your own stories, put on a play, or make a computer write poetry!<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-sound-blocks\/\"><strong>The Sound Blocks<\/strong><\/a> \u2014 Play music with code! Add custom sound effects, too. Tynker\u2019s brand new music tool supports MIDI and MP3.&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/the-synth-blocks\/\"><strong>The Synth Blocks<\/strong><\/a> \u2014 Create your own sound effects and instruments! You can create crunchy dubstep drops, glitchy chiptunes, or instruments from any style of music you can imagine!&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-code-block-tricks\/\"><strong>Code Block Tricks<\/strong><\/a> \u2014 Get top-secret ninja tips for writing code fast in Tynker Workshop.&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/\"><strong>The Pen Blocks<\/strong><\/a> \u2014 Make your actors draw as they move. Create patterns, draw geometric shapes, and more.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-physics-blocks\/\"><strong>The Physics Blocks<\/strong><\/a> \u2014 Create games or simulations with gravity, collisions, and more. Think: <em>Angry Birds<\/em> and <em>Marble Madness<\/em>.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/the-ar-blocks\/\"><strong>The Augmented Reality (AR) Blocks<\/strong><\/a> \u2014 Want to use video or photos in your programs? Try the AR Blocks, which let you code your own selfie!&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-ai-blocks\/\"><strong>The Artificial Intelligence (AI) Blocks<\/strong><\/a> \u2014 Take your AR projects to the next level with face-, hand-, and pose-tracking. Explore what makes AI special.&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/debugger\/\"><strong>The Debugger<\/strong><\/a><span style=\"color: initial;\"> \u2014 Learn about Tynker\u2019s data debugger and get bug-fixing tips.<\/span><\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-tutorial-builder\/\"><strong>The Tutorial Builder<\/strong><\/a> \u2014 Did you ever make a really cool Tynker Block project and wish you could teach the whole world exactly how you did it? Now you can!<\/li>\n\n\n\n<li><a href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-python-editor\/\"><strong>The Python Editor<\/strong><\/a> \u2014 Looking for a challenge? Ready for your next step on your coding journey? Learn Python with Tynker too, and take the plunge into text-based coding.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\"> <br> <a class=\"sf-button large accent standard \" href=\"https:\/\/www.tynker.com\" target=\"_blank\"><span class=\"text\">GET STARTED FOR FREE<\/span><\/a>    <br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you know that you can use Tynker to create colorful, original drawings? This complex, spiraling image was created with just a handful of code blocks using Tynker\u2019s Pen.&nbsp; To use the Pen Blocks, you must enable them first. You\u2019ve got two options.&nbsp; Option #1:&nbsp;Drag any Pen block in your code, and the extension will automatically be enabled! Search for [&hellip;]<\/p>\n","protected":false},"author":25,"featured_media":20738,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[510,12,123],"tags":[432,429],"class_list":["post-20640","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-block-coding","category-ideas-and-tips","category-new-tynker-features","tag-creative-coding","tag-tynker-toolbox"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Tynker Toolbox: The Pen Blocks - Tynker Blog<\/title>\n<meta name=\"description\" content=\"Tynker&#039;s Pen Blocks make your actors draw as they move. Create patterns, draw geometric shapes, and explore mathematics with block code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tynker Toolbox: The Pen Blocks - Tynker Blog\" \/>\n<meta property=\"og:description\" content=\"Tynker&#039;s Pen Blocks make your actors draw as they move. Create patterns, draw geometric shapes, and explore mathematics with block code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/\" \/>\n<meta property=\"og:site_name\" content=\"Tynker Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Gotynker\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-17T15:51:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-11T20:19:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407155929\/blog-14.png\" \/>\n\t<meta property=\"og:image:width\" content=\"996\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Tynker Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@gotynker\" \/>\n<meta name=\"twitter:site\" content=\"@gotynker\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tynker Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tynker Toolbox: The Pen Blocks - Tynker Blog","description":"Tynker's Pen Blocks make your actors draw as they move. Create patterns, draw geometric shapes, and explore mathematics with block code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/","og_locale":"en_US","og_type":"article","og_title":"Tynker Toolbox: The Pen Blocks - Tynker Blog","og_description":"Tynker's Pen Blocks make your actors draw as they move. Create patterns, draw geometric shapes, and explore mathematics with block code.","og_url":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/","og_site_name":"Tynker Blog","article_publisher":"https:\/\/www.facebook.com\/Gotynker\/","article_published_time":"2023-07-17T15:51:49+00:00","article_modified_time":"2023-09-11T20:19:12+00:00","og_image":[{"width":996,"height":450,"url":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407155929\/blog-14.png","type":"image\/png"}],"author":"Tynker Team","twitter_card":"summary_large_image","twitter_creator":"@gotynker","twitter_site":"@gotynker","twitter_misc":{"Written by":"Tynker Team","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#article","isPartOf":{"@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/"},"author":{"name":"Tynker Team","@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/person\/934d769f4839cb9df678306ee728f671"},"headline":"Tynker Toolbox: The Pen Blocks","datePublished":"2023-07-17T15:51:49+00:00","dateModified":"2023-09-11T20:19:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/"},"wordCount":1680,"publisher":{"@id":"https:\/\/www.tynker.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#primaryimage"},"thumbnailUrl":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407155929\/blog-14.png","keywords":["Creative Coding","Tynker Toolbox"],"articleSection":["Block Coding","Ideas and Tips","New Tynker Features"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/","url":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/","name":"Tynker Toolbox: The Pen Blocks - Tynker Blog","isPartOf":{"@id":"https:\/\/www.tynker.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#primaryimage"},"image":{"@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#primaryimage"},"thumbnailUrl":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407155929\/blog-14.png","datePublished":"2023-07-17T15:51:49+00:00","dateModified":"2023-09-11T20:19:12+00:00","description":"Tynker's Pen Blocks make your actors draw as they move. Create patterns, draw geometric shapes, and explore mathematics with block code.","breadcrumb":{"@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#primaryimage","url":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407155929\/blog-14.png","contentUrl":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20200407155929\/blog-14.png","width":996,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/www.tynker.com\/blog\/tynker-toolbox-the-pen-blocks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Coding for Kids","item":"https:\/\/www.tynker.com\/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https:\/\/www.tynker.com\/blog\/"},{"@type":"ListItem","position":3,"name":"Tynker Toolbox: The Pen Blocks"}]},{"@type":"WebSite","@id":"https:\/\/www.tynker.com\/blog\/#website","url":"https:\/\/www.tynker.com\/blog\/","name":"Tynker Blog","description":"Tynker makes it fun and easy to learn computer programming. Get started today with Tynker&#039;s easy-to-learn, visual programming courses designed for young learners in grades K-12.","publisher":{"@id":"https:\/\/www.tynker.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.tynker.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.tynker.com\/blog\/#organization","name":"Tynker - Coding for Kids","url":"https:\/\/www.tynker.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20220713063303\/appicon-120.png","contentUrl":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20220713063303\/appicon-120.png","width":120,"height":120,"caption":"Tynker - Coding for Kids"},"image":{"@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Gotynker\/","https:\/\/x.com\/gotynker","https:\/\/www.instagram.com\/tynkercoding\/","https:\/\/www.pinterest.com\/gotynker\/","https:\/\/www.linkedin.com\/company\/tynker"]},{"@type":"Person","@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/person\/934d769f4839cb9df678306ee728f671","name":"Tynker Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/53c002ba171d44324489e00b00f5b0ebf381cabfef3347db5e6d5257409d92ba?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/53c002ba171d44324489e00b00f5b0ebf381cabfef3347db5e6d5257409d92ba?s=96&d=mm&r=g","caption":"Tynker Team"},"url":"https:\/\/www.tynker.com\/blog\/author\/lpateltynker-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/posts\/20640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/comments?post=20640"}],"version-history":[{"count":41,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/posts\/20640\/revisions"}],"predecessor-version":[{"id":36023,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/posts\/20640\/revisions\/36023"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/media\/20738"}],"wp:attachment":[{"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/media?parent=20640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/categories?post=20640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/tags?post=20640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}