SlideShare a Scribd company logo
3
Most read
6
Most read
8
Most read
Microsoft® Small BasicTurtle GraphicsEstimated time to complete this lesson: 1 hour
Turtle GraphicsIn this lesson, you will learn about:Using the Turtle object to move the Turtle on the screen.Using the various properties and operations of the Turtle object to create graphics.Drawing colorful designs by using the Turtle object in For..EndFor loops.
Meet the Turtle The Turtle is displayed on the screen.Meet your new friend in Small Basic—the Turtle! The Turtle helps you draw interesting graphics on the graphics window.You can display the Turtle by using the Show operation. Click the               button on the toolbar.
Properties and Operations of the Turtle ObjectYou can give commands to the Turtle by using the Turtle object. In turn, the Turtle draws graphics on the screen. Let’s look at some of these functions…To set the location of the Turtle on the screen, you can specify the x- and y-coordinates by using the X and Y properties of the Turtle object. To move the Turtle for a particular distance, you can use the Move operation. Similarly, you can use the MoveTo operation, and specify the x- and y-coordinates of the location where you want the Turtle to move. To draw with the Turtle, you use the PenDown operation. If you want the Turtle to stop drawing on the screen, use the PenUpoperation.
Properties and Operations of the Turtle ObjectLet’s have a look at some more functions…To set the speed of the Turtle, you use the Speed property. You can choose a value from 1 to 10, 1 being the slowest and 10 being the fastest.To turn the Turtle, use the Turn operation. When using this operation, you define an angle in degrees. Alternatively, you can also use the TurnRightandTurnLeftoperations, which turn the Turtle by 90 degrees to the right and left, respectively.To turn the Turtle by a specific angle of rotation, you can use the Angle property and define the angle of rotation in degrees. The default angle of the Turtle is 0 degrees. An angle of 0 degrees means the turtle is facing up on the screen.
Making the Turtle MoveLet us start by making the Turtle draw a simple triangle on the screen.outputClick the               button on the toolbar.
Having Fun with the TurtleNow that you know how to communicate with the Turtle, let’s use it for some fun activities.Let’s use the For loop and instruct the Turtle to move and turn at specific distances and angles, creating a unique graphical design in the process.You can use the PenColor property of the GraphicsWindow object to add color to your design.
Having Fun with the TurtleYou can also use the Turtle to create multiple, colorful graphics on the screen. Let’s look at a program that provides our desired output.output
Let’s Summarize…Congratulations! Now you know how to:Use the Turtle object to move the Turtle on the screen.Use the various properties and operations of the Turtle object to create graphics.Draw colorful designs by using the Turtle object in For..EndFor loops.
It’s Time to Apply Your Learning…Write a program to display a Turtle and use it to draw colorful graphics by performing the following steps:Set the height and width of the graphics window to 400.

More Related Content

PPTX
Animation for kids and beginners
PPTX
Photoshop intro to basics
PPT
Coreldraw
PPT
Scratch Lesson 2 – Paint Editor
PPTX
Types of animation
PDF
Coding Basics with Scratch
PPTX
Rigging in 3D animation
PPTX
Computer Coding with Scratch: Lesson 2_primaryschoollessons
Animation for kids and beginners
Photoshop intro to basics
Coreldraw
Scratch Lesson 2 – Paint Editor
Types of animation
Coding Basics with Scratch
Rigging in 3D animation
Computer Coding with Scratch: Lesson 2_primaryschoollessons

What's hot (20)

PPTX
Android User Interface
PPTX
Unity - Essentials of Programming in Unity
PDF
What is agile model
PDF
3D modelling and animation using Autodesk maya
PPTX
Corel draw tools
PPT
Uso de Scratch
PDF
Introduction to figma
PPTX
Flappy bird game in c#
PPTX
animation
PPT
Introduction To Flash
PPTX
DHTML - Events & Buttons
PDF
Introduction to blender
PPTX
source code metrics and other maintenance tools and techniques
PPTX
Scratch programming
PDF
Car Game - Final Year Project
PDF
Cloud computing and software engineering
PDF
Corel draw 14 hindi notes
PPTX
PHOTOSHOP BASICS
PPTX
Adobe flash
PDF
2D & 3D ANIMATION
Android User Interface
Unity - Essentials of Programming in Unity
What is agile model
3D modelling and animation using Autodesk maya
Corel draw tools
Uso de Scratch
Introduction to figma
Flappy bird game in c#
animation
Introduction To Flash
DHTML - Events & Buttons
Introduction to blender
source code metrics and other maintenance tools and techniques
Scratch programming
Car Game - Final Year Project
Cloud computing and software engineering
Corel draw 14 hindi notes
PHOTOSHOP BASICS
Adobe flash
2D & 3D ANIMATION
Ad

Viewers also liked (20)

PPTX
2.1 graphics window
PPTX
2.3 exploring shapes
PPTX
1.1 introduction to small basic
PPTX
1.4 conditions and loops
PPT
Basic logo-command
DOC
In-bai tap logo_01 (hsinh)
PPTX
DOC
Msw logo application user manual for teacher
PPT
Logo primitives
DOC
Geometria de las Tortugas
DOC
In-bai tap logo_02 -thu tuc (gv)
PPT
DOCX
Small basic
PPTX
Turtle graphics
PPTX
La Tortuga Gráfica - Small Basic
PPTX
2.5 clock, desktop, and dictionary objects
PPTX
1.3 variables
PPTX
1.5 branching and subroutines
PPTX
Second commandment
PPTX
First commandment
2.1 graphics window
2.3 exploring shapes
1.1 introduction to small basic
1.4 conditions and loops
Basic logo-command
In-bai tap logo_01 (hsinh)
Msw logo application user manual for teacher
Logo primitives
Geometria de las Tortugas
In-bai tap logo_02 -thu tuc (gv)
Small basic
Turtle graphics
La Tortuga Gráfica - Small Basic
2.5 clock, desktop, and dictionary objects
1.3 variables
1.5 branching and subroutines
Second commandment
First commandment
Ad

Similar to 2.2 turtle graphics (20)

PPTX
7.Advanced Scripts in Scratch.pptx
PDF
PPTX
02 unity 3_d_part_1
PDF
Star logo nova code cookbook
PDF
Star logo nova code cookbook(1)
PPTX
03 unity 3_d_part_2
PPTX
4.2 responding to events
PDF
An Introduction to the Unity GamingEngine
PPTX
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...
DOCX
Scratch for kids syllabus for 5 hours by bibek pandit
PPTX
1.2.1 Displaying Objects...........................pptx
PPTX
1. production experiments
PDF
Scratch MIT Coding Basics
PDF
Scratch Animation
PDF
Alice01
PPTX
Scratch Lesson 2
PPTX
03 whack a-witch!
PPTX
L1 Slides - Media - Vector graphics - Y8.pptx
PDF
PDF
7.Advanced Scripts in Scratch.pptx
02 unity 3_d_part_1
Star logo nova code cookbook
Star logo nova code cookbook(1)
03 unity 3_d_part_2
4.2 responding to events
An Introduction to the Unity GamingEngine
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...
Scratch for kids syllabus for 5 hours by bibek pandit
1.2.1 Displaying Objects...........................pptx
1. production experiments
Scratch MIT Coding Basics
Scratch Animation
Alice01
Scratch Lesson 2
03 whack a-witch!
L1 Slides - Media - Vector graphics - Y8.pptx

More from allenbailey (13)

PPTX
5.1 sharing code
PPTX
4.4 advanced games
PPTX
4.3 collision detection
PPTX
4.1 playing with shapes
PPTX
3.6 debugging aids
PPTX
3.5 the controls object
PPTX
3.4 events and interactivity
PPTX
3.3 the math object
PPTX
3.2 stacks and arrays
PPTX
3.1 file input and output
PPTX
2.6 flickr, image list, and network objects
PPTX
2.4 sound, program, and text objects
PPTX
1.2 statements, properties, and operations
5.1 sharing code
4.4 advanced games
4.3 collision detection
4.1 playing with shapes
3.6 debugging aids
3.5 the controls object
3.4 events and interactivity
3.3 the math object
3.2 stacks and arrays
3.1 file input and output
2.6 flickr, image list, and network objects
2.4 sound, program, and text objects
1.2 statements, properties, and operations

Recently uploaded (20)

PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Hybrid model detection and classification of lung cancer
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
O2C Customer Invoices to Receipt V15A.pptx
Module 1.ppt Iot fundamentals and Architecture
Hindi spoken digit analysis for native and non-native speakers
WOOl fibre morphology and structure.pdf for textiles
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
NewMind AI Weekly Chronicles – August ’25 Week III
Group 1 Presentation -Planning and Decision Making .pptx
Chapter 5: Probability Theory and Statistics
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Getting Started with Data Integration: FME Form 101
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Hybrid model detection and classification of lung cancer
Final SEM Unit 1 for mit wpu at pune .pptx
Assigned Numbers - 2025 - Bluetooth® Document
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

2.2 turtle graphics

  • 1. Microsoft® Small BasicTurtle GraphicsEstimated time to complete this lesson: 1 hour
  • 2. Turtle GraphicsIn this lesson, you will learn about:Using the Turtle object to move the Turtle on the screen.Using the various properties and operations of the Turtle object to create graphics.Drawing colorful designs by using the Turtle object in For..EndFor loops.
  • 3. Meet the Turtle The Turtle is displayed on the screen.Meet your new friend in Small Basic—the Turtle! The Turtle helps you draw interesting graphics on the graphics window.You can display the Turtle by using the Show operation. Click the button on the toolbar.
  • 4. Properties and Operations of the Turtle ObjectYou can give commands to the Turtle by using the Turtle object. In turn, the Turtle draws graphics on the screen. Let’s look at some of these functions…To set the location of the Turtle on the screen, you can specify the x- and y-coordinates by using the X and Y properties of the Turtle object. To move the Turtle for a particular distance, you can use the Move operation. Similarly, you can use the MoveTo operation, and specify the x- and y-coordinates of the location where you want the Turtle to move. To draw with the Turtle, you use the PenDown operation. If you want the Turtle to stop drawing on the screen, use the PenUpoperation.
  • 5. Properties and Operations of the Turtle ObjectLet’s have a look at some more functions…To set the speed of the Turtle, you use the Speed property. You can choose a value from 1 to 10, 1 being the slowest and 10 being the fastest.To turn the Turtle, use the Turn operation. When using this operation, you define an angle in degrees. Alternatively, you can also use the TurnRightandTurnLeftoperations, which turn the Turtle by 90 degrees to the right and left, respectively.To turn the Turtle by a specific angle of rotation, you can use the Angle property and define the angle of rotation in degrees. The default angle of the Turtle is 0 degrees. An angle of 0 degrees means the turtle is facing up on the screen.
  • 6. Making the Turtle MoveLet us start by making the Turtle draw a simple triangle on the screen.outputClick the button on the toolbar.
  • 7. Having Fun with the TurtleNow that you know how to communicate with the Turtle, let’s use it for some fun activities.Let’s use the For loop and instruct the Turtle to move and turn at specific distances and angles, creating a unique graphical design in the process.You can use the PenColor property of the GraphicsWindow object to add color to your design.
  • 8. Having Fun with the TurtleYou can also use the Turtle to create multiple, colorful graphics on the screen. Let’s look at a program that provides our desired output.output
  • 9. Let’s Summarize…Congratulations! Now you know how to:Use the Turtle object to move the Turtle on the screen.Use the various properties and operations of the Turtle object to create graphics.Draw colorful designs by using the Turtle object in For..EndFor loops.
  • 10. It’s Time to Apply Your Learning…Write a program to display a Turtle and use it to draw colorful graphics by performing the following steps:Set the height and width of the graphics window to 400.
  • 11. Use the Turtle to draw two star-shaped graphics on the screen.
  • 12. Format the stars to be separate and colorful.

Editor's Notes

  • #4: You have learned how to use the text window and the graphics window. You have also learned about various statements, properties, and operations. Now, meet your new friend in Small Basic—the Turtle. With the help of the Turtle, you can draw shapes and graphics on the screen. You can hide the Turtle by using the Hide operation.Code:Turtle.Show()
  • #8: When you click Run on the Toolbar or press F5 on the keyboard, the Turtle draws a colored, square graphical design on the screen.Code:GraphicsWindow.Title = "Turtle Graphics"GraphicsWindow.Height = 320GraphicsWindow.Width = 300GraphicsWindow.PenColor = "purple"Turtle.Show()Turtle.Speed = 8Turtle.X = 150Turtle.Y = 150For i = 0 To 200 Step 5 Turtle.Move(i) Turtle.Turn(90)EndFor
  • #11: Solution: GraphicsWindow.Height = 400GraphicsWindow.Width = 400GraphicsWindow.Title = "Turtle Graphics"Turtle.Show()Turtle.Speed = 10Turtle.X = 100Turtle.Y = 200For i = 0 To 200 Step 5 GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()Turtle.Move(i) Turtle.Turn(150)EndForTurtle.PenUp()Turtle.Move(300)Turtle.Turn(105)Turtle.Move(150)Turtle.PenDown()For i = 0 To 200 Step 5 GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()Turtle.Move(i) Turtle.Turn(150)EndFor