> For the complete documentation index, see [llms.txt](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/cs-in-entertainment/exploring-pen-tools/shapes.md).

# Shapes

Create a 2nd sprite that we will use to draw shapes - it should also be a small circle or square (in any color) that is located on the anchor. Make sure you are making a NEW sprite, not a costume for the previous sprite

Before we can draw on the stage - we have to get the pen and stage ready to draw. Use the same blocks of code as before&#x20;

<figure><img src="https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LpUPSf3tCxHePJxNjfg%2Fuploads%2FJgLwmIdepz7PaAqs1brW%2Fimage.png?alt=media&amp;token=37e41ce7-7057-4324-bf50-dbc50cbdfd5e" alt=""><figcaption></figcaption></figure>

Now insert this algorithm to that code. What is drawn?![](https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LpUPSf3tCxHePJxNjfg%2Fuploads%2FRQ9HifXb7TEWzE4qf44v%2Fimage.png?alt=media\&token=336b161f-6fc7-406b-8e2a-3b1be4a151bf)

Add the Yellow Event Block: When the space bar is pressed & then have the sprite move to the center of the stage

When the space bar is pressed - we want this sprite to draw a triangle - use this code. Make sure you understand what controls the length of the sides and what controls the turns. You may prefer your code with a shorter wait time than this picture. Try waiting .1 seconds instead of 1 whole second

<figure><img src="https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LpUPSf3tCxHePJxNjfg%2Fuploads%2FZqGRMmbVJmJZARVug6UD%2Fimage.png?alt=media&amp;token=01a852cc-4cf4-41b3-a746-5fae6b566dab" alt=""><figcaption></figcaption></figure>

Add the yellow event block: when the H key is pressed  ![](https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LpUPSf3tCxHePJxNjfg%2Fuploads%2F0F3yD9veEizEUc8tgy2k%2Fimage.png?alt=media\&token=934fef5f-8999-4014-a48e-f49084839aed)When the H key is pressed - we want to clear the stage (pen block) and then go to the center (0,0). Then we want the program to draw a hexagon. If you hexagon is "crooked" consider having it point down before it starts to draw

<figure><img src="https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LpUPSf3tCxHePJxNjfg%2Fuploads%2FEDnxoxwhTwQeKHB0J31g%2Fimage.png?alt=media&amp;token=94dd4267-45e7-43fb-8edb-e2a04fbd9878" alt=""><figcaption></figcaption></figure>

Now that we have the basic hexagon - we want to turn this into a more complex drawing that consists of more than one hexagon.&#x20;

Modify your hexagon drawing code to do the following&#x20;

<figure><img src="https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LpUPSf3tCxHePJxNjfg%2Fuploads%2FmrjkE0t3MDguE2rrOoMp%2Fimage.png?alt=media&amp;token=45cccd9b-60fe-45f2-a980-15e9a374aef2" alt=""><figcaption></figcaption></figure>

Now - play around with some of the pen color, hue, size options and see if you make this even MORE creative

Our Final Shape will be a 3D tube: Create a new event by writing a new algorithm that will start when the 3 key is pressed, clear the screen, go to the middle of the stage and then insert this code

<figure><img src="https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LpUPSf3tCxHePJxNjfg%2Fuploads%2FuotQ3eSe67rkMrjgPC0g%2Fimage.png?alt=media&amp;token=5d5c0dd3-2e5a-46ba-9346-79a9cafceca4" alt=""><figcaption></figcaption></figure>
