Class 4 Exam  >  Class 4 Notes  >  Year 4 Computing IGCSE (Cambridge)  >  MSWLogo - Using PenColors and PenSizes

MSWLogo - Using PenColors and PenSizes | Year 4 Computing IGCSE (Cambridge) - Class 4 PDF Download

MSWLogo provides tools to change the color and thickness of the pen the turtle uses to draw. By adjusting the pen's settings, you can create colorful drawings and control how thick or thin the lines are.

Changing Pen Color:

The SETCOLOR command in MSWLogo allows you to change the color of the turtle’s pen. You can choose any color available in the color palette.

The syntax for changing the pen color is:

  • SETCOLOR color-number

For example, to set the pen color to red, you can use:

  • SETCOLOR 4

In MSWLogo, each color is assigned a number. For instance, color 1 is black, color 2 is red, color 3 is green, and so on. You can refer to the color chart in MSWLogo to know the number corresponding to each color.

Changing Pen Thickness:

You can change the thickness of the turtle’s pen using the SETTHICKNESS command. This will affect how thick or thin the lines are when the turtle draws.

The syntax for changing the pen thickness is:

  • SETTHICKNESS value

For example, if you want the pen to draw with a thickness of 3 units, you can use:

  • SETTHICKNESS 3

Experiment with different thickness values to see how the lines change. A higher value will result in thicker lines, and a smaller value will create thinner lines.

Experimenting with Different Pen Sizes

By adjusting the pen size and experimenting with different settings, you can create unique designs. You can use the SETTHICKNESS and SETCOLOR commands to experiment and see how different combinations of pen color and thickness affect your drawings.

Drawing with Varying Pen Sizes:

To draw a pattern using different pen sizes, you can use the REPEAT command to make the turtle draw multiple shapes with varying pen thicknesses. For example, you can make the turtle draw a series of circles with increasing thickness:

  • REPEAT 10 [SETTHICKNESS counter FORWARD 50 RIGHT 36]

This command tells the turtle to draw 10 circles, each with an increasing pen thickness, by changing the value of counter each time the loop repeats.

Using Loops and Commands to Create Colorful Patterns

One of the best features of MSWLogo is its ability to create colorful and repetitive patterns using loops. By using the REPEAT command, you can create patterns that use different colors and pen sizes to make your drawing more interesting.

Creating a Colorful Pattern:

Let’s use a simple loop to create a colorful spiral pattern. The turtle will draw lines, change the pen color, and move in a circular direction. Here is an example of how to create a colorful spiral:

  • REPEAT 36 [SETCOLOR counter FORWARD 50 RIGHT 10]

This command tells the turtle to repeat the drawing action 36 times. Each time, it moves forward by 50 steps and turns 10 degrees to the right. The pen color changes each time the loop repeats, creating a colorful spiral effect. You can experiment with different values for the number of repeats, the size of the forward steps, and the angle of rotation to create more complex patterns.

Drawing Shapes with Varied Pen Settings

Now that you know how to change the pen color and thickness, let’s create some shapes with varied pen settings. We will draw a polygon where each side is drawn with a different color and thickness.

Example: Drawing a Polygon with Different Pen Settings

Here’s a simple way to draw a hexagon (6-sided polygon) with different colors and thickness for each side:

  • REPEAT 6 [SETCOLOR counter SETTHICKNESS counter FORWARD 100 RIGHT 60]

This command will draw a hexagon, changing the pen color and thickness after each side. The turtle will repeat the process 6 times to form the 6 sides of the polygon. You can modify the values of counter to experiment with different colors and thicknesses for each side.

Summary:

In this chapter, we learned how to use MSWLogo to change the pen color and thickness, experiment with different pen sizes, and create colorful patterns. We also explored how to use loops and commands to draw shapes with varied pen settings, making the drawing process more efficient and creative. MSWLogo provides a fun way to learn programming while creating vibrant and interesting designs.

The document MSWLogo - Using PenColors and PenSizes | Year 4 Computing IGCSE (Cambridge) - Class 4 is a part of the Class 4 Course Year 4 Computing IGCSE (Cambridge).
All you need of Class 4 at this link: Class 4
8 docs|8 tests
Related Searches

ppt

,

pdf

,

Semester Notes

,

mock tests for examination

,

video lectures

,

Sample Paper

,

Important questions

,

Objective type Questions

,

practice quizzes

,

study material

,

past year papers

,

Previous Year Questions with Solutions

,

MSWLogo - Using PenColors and PenSizes | Year 4 Computing IGCSE (Cambridge) - Class 4

,

MSWLogo - Using PenColors and PenSizes | Year 4 Computing IGCSE (Cambridge) - Class 4

,

Free

,

Summary

,

MCQs

,

Extra Questions

,

MSWLogo - Using PenColors and PenSizes | Year 4 Computing IGCSE (Cambridge) - Class 4

,

Exam

,

Viva Questions

,

shortcuts and tricks

;