SlideShare una empresa de Scribd logo
1 de 14
Microsoft® Small Basic Exploring Shapes Estimated time to complete this lesson: 1 hour
Exploring Shapes In this lesson, you will learn about: Creating shapes by using the Shapes object. Using various operations of the Shapes object. Animating shapes on the screen.
Introduction to the Shapes Object So far, you have learned to use the GraphicsWindow and the Turtle objects to draw patterns in Small Basic. This lesson introduces you to the Shapes object offered by Small Basic! You can use the Shapes object to add, rotate, and animate the shapes in the graphics window.  You can color your shapes by using specific properties of the GraphicsWindow object.
Operations of the Shapes Object Using certain operations of the Shapes object, you can give a vibrant look and feel to the shapes you create. Some of these operations are: ,[object Object]
AddRectangle
HideShape
ShowShape
SetOpacity
GetOpacity
Move
Animate
Zoom,[object Object]
Operations of the Shapes Object Now let’s understand these operations in detail… HideShape—This operation allows you to hide a shape displayed on the graphics window. ShowShape—This operation allows you to display a shape on the graphics window. AddRectangle—Using this operation, you can draw a rectangle on the graphics window.  SetOpacity—You can set the opacity of a shape by using the SetOpacity operation. You must specify the name of the shape and an opacity level from 0 to 100. GetOpacity—This operation gets the opacity of a  shape. You must specify the name of the shape  as a parameter to this operation.
Operations of the Shapes Object Let’s look at another example to demonstrate some more operations… In this example, we have used the AddImageoperation to insert an image on the screen. Next, we have used the Move, Animate and Zoom operations to perform various actions on the image.

Más contenido relacionado

La actualidad más candente

Facs2930 presentation alex_k
Facs2930 presentation alex_kFacs2930 presentation alex_k
Facs2930 presentation alex_kalex1229
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced gamesallenbailey
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detectionallenbailey
 
learn sketchup (for the beginners)
learn sketchup (for the beginners)learn sketchup (for the beginners)
learn sketchup (for the beginners)Moksha Bhatia
 
Digipak creation
Digipak creationDigipak creation
Digipak creationFlee3
 
Animation Title card making
Animation Title card makingAnimation Title card making
Animation Title card makingG. Udhaya Sankar
 
Production
Production Production
Production Fryers
 
3. production experiments(2)
3. production experiments(2)3. production experiments(2)
3. production experiments(2)Will Stewart
 
Character screenshots
Character screenshotsCharacter screenshots
Character screenshotsDaniel1Nye
 
Plan601 e session 2 demo
Plan601 e session 2 demoPlan601 e session 2 demo
Plan601 e session 2 demorkottam
 
Creating lines in sketchup
Creating lines in sketchupCreating lines in sketchup
Creating lines in sketchupJim Robb
 
Google sketchup8
Google sketchup8Google sketchup8
Google sketchup8Trianz King
 

La actualidad más candente (20)

Max2015 ch01
Max2015 ch01Max2015 ch01
Max2015 ch01
 
Unit2
Unit2Unit2
Unit2
 
Facs2930 presentation alex_k
Facs2930 presentation alex_kFacs2930 presentation alex_k
Facs2930 presentation alex_k
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced games
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detection
 
learn sketchup (for the beginners)
learn sketchup (for the beginners)learn sketchup (for the beginners)
learn sketchup (for the beginners)
 
Google sketch up tutorial
Google sketch up tutorialGoogle sketch up tutorial
Google sketch up tutorial
 
Digipak creation
Digipak creationDigipak creation
Digipak creation
 
Kodu class
Kodu classKodu class
Kodu class
 
Animation Title card making
Animation Title card makingAnimation Title card making
Animation Title card making
 
Production
Production Production
Production
 
Animation introduction
Animation introductionAnimation introduction
Animation introduction
 
3. production experiments(2)
3. production experiments(2)3. production experiments(2)
3. production experiments(2)
 
Texturemapping
TexturemappingTexturemapping
Texturemapping
 
Character screenshots
Character screenshotsCharacter screenshots
Character screenshots
 
Sketchup modul
Sketchup modulSketchup modul
Sketchup modul
 
Plan601 e session 2 demo
Plan601 e session 2 demoPlan601 e session 2 demo
Plan601 e session 2 demo
 
Creating lines in sketchup
Creating lines in sketchupCreating lines in sketchup
Creating lines in sketchup
 
Plan601E Session 2 Demo
Plan601E Session 2 DemoPlan601E Session 2 Demo
Plan601E Session 2 Demo
 
Google sketchup8
Google sketchup8Google sketchup8
Google sketchup8
 

Destacado

1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basicallenbailey
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loopsallenbailey
 
2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objectsallenbailey
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutinesallenbailey
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objectsallenbailey
 
Basic logo-command
Basic logo-commandBasic logo-command
Basic logo-commanddat298
 
In-bai tap logo_01 (hsinh)
  In-bai tap logo_01 (hsinh)  In-bai tap logo_01 (hsinh)
In-bai tap logo_01 (hsinh)saobiennt
 
Msw logo application user manual for teacher
Msw logo application user manual for teacherMsw logo application user manual for teacher
Msw logo application user manual for teacherfarah510
 
In-bai tap logo_02 -thu tuc (hs)
  In-bai tap logo_02 -thu tuc (hs)  In-bai tap logo_02 -thu tuc (hs)
In-bai tap logo_02 -thu tuc (hs)saobiennt
 
Logo primitives
Logo primitivesLogo primitives
Logo primitivessshaner88
 
In-bai tap logo_02 -thu tuc (gv)
  In-bai tap logo_02 -thu tuc (gv)  In-bai tap logo_02 -thu tuc (gv)
In-bai tap logo_02 -thu tuc (gv)saobiennt
 

Destacado (16)

1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basic
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loops
 
Small basic
Small basicSmall basic
Small basic
 
2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objects
 
1.3 variables
1.3   variables1.3   variables
1.3 variables
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutines
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objects
 
Basic logo-command
Basic logo-commandBasic logo-command
Basic logo-command
 
In-bai tap logo_01 (hsinh)
  In-bai tap logo_01 (hsinh)  In-bai tap logo_01 (hsinh)
In-bai tap logo_01 (hsinh)
 
Msw logo
Msw logoMsw logo
Msw logo
 
Msw logo application user manual for teacher
Msw logo application user manual for teacherMsw logo application user manual for teacher
Msw logo application user manual for teacher
 
In-bai tap logo_02 -thu tuc (hs)
  In-bai tap logo_02 -thu tuc (hs)  In-bai tap logo_02 -thu tuc (hs)
In-bai tap logo_02 -thu tuc (hs)
 
Logo primitives
Logo primitivesLogo primitives
Logo primitives
 
Geometria de las Tortugas
Geometria de las  TortugasGeometria de las  Tortugas
Geometria de las Tortugas
 
In-bai tap logo_02 -thu tuc (gv)
  In-bai tap logo_02 -thu tuc (gv)  In-bai tap logo_02 -thu tuc (gv)
In-bai tap logo_02 -thu tuc (gv)
 
Logo
LogoLogo
Logo
 

Similar a 2.3 exploring shapes

Digital Techniques Presentation
Digital Techniques PresentationDigital Techniques Presentation
Digital Techniques Presentationpiglet1987
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls objectallenbailey
 
Graphics on the Go
Graphics on the GoGraphics on the Go
Graphics on the GoGil Irizarry
 
NewTek Lightwave 3D: Modifying Lightwave Objects
NewTek Lightwave 3D: Modifying Lightwave ObjectsNewTek Lightwave 3D: Modifying Lightwave Objects
NewTek Lightwave 3D: Modifying Lightwave ObjectsSamuel Edsall
 
How to Create Animation Using the AnimatedAlign Widget.pptx
How to Create Animation Using the AnimatedAlign Widget.pptxHow to Create Animation Using the AnimatedAlign Widget.pptx
How to Create Animation Using the AnimatedAlign Widget.pptxFlutter Agency
 
Android animations
Android animationsAndroid animations
Android animationsKumar
 
Customizing Your Document in PerfectForms
Customizing Your Document in PerfectFormsCustomizing Your Document in PerfectForms
Customizing Your Document in PerfectFormsKaren Hunter-Sliger
 
How to animate objects in power point
How to animate objects in power pointHow to animate objects in power point
How to animate objects in power pointJacqui Sharp
 
It's the arts! Playing around with the Android canvas
It's the arts! Playing around with the Android canvasIt's the arts! Playing around with the Android canvas
It's the arts! Playing around with the Android canvasSergi Martínez
 
Powerpoint 2016 transitions animations timing the presentation
Powerpoint 2016 transitions animations timing the presentationPowerpoint 2016 transitions animations timing the presentation
Powerpoint 2016 transitions animations timing the presentationDavid Raudales
 
Captivate 9 Features
Captivate 9 FeaturesCaptivate 9 Features
Captivate 9 FeaturesAman Vohra
 
On the tomcat drive in folder cosc210 you will find file named Paint.docx
On the tomcat drive in folder cosc210 you will find file named Paint.docxOn the tomcat drive in folder cosc210 you will find file named Paint.docx
On the tomcat drive in folder cosc210 you will find file named Paint.docxdunhamadell
 
Manual Layout Revisited
Manual Layout RevisitedManual Layout Revisited
Manual Layout Revisitedgillygize
 

Similar a 2.3 exploring shapes (20)

M14 overview
M14 overviewM14 overview
M14 overview
 
Digital Techniques Presentation
Digital Techniques PresentationDigital Techniques Presentation
Digital Techniques Presentation
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls object
 
Graphics on the Go
Graphics on the GoGraphics on the Go
Graphics on the Go
 
NewTek Lightwave 3D: Modifying Lightwave Objects
NewTek Lightwave 3D: Modifying Lightwave ObjectsNewTek Lightwave 3D: Modifying Lightwave Objects
NewTek Lightwave 3D: Modifying Lightwave Objects
 
How to Create Animation Using the AnimatedAlign Widget.pptx
How to Create Animation Using the AnimatedAlign Widget.pptxHow to Create Animation Using the AnimatedAlign Widget.pptx
How to Create Animation Using the AnimatedAlign Widget.pptx
 
Android animations
Android animationsAndroid animations
Android animations
 
Customizing Your Document in PerfectForms
Customizing Your Document in PerfectFormsCustomizing Your Document in PerfectForms
Customizing Your Document in PerfectForms
 
How to animate objects in power point
How to animate objects in power pointHow to animate objects in power point
How to animate objects in power point
 
It's the arts! Playing around with the Android canvas
It's the arts! Playing around with the Android canvasIt's the arts! Playing around with the Android canvas
It's the arts! Playing around with the Android canvas
 
Powerpoint 2016 transitions animations timing the presentation
Powerpoint 2016 transitions animations timing the presentationPowerpoint 2016 transitions animations timing the presentation
Powerpoint 2016 transitions animations timing the presentation
 
Get the Picture
Get the PictureGet the Picture
Get the Picture
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
 
Captivate 9 Features
Captivate 9 FeaturesCaptivate 9 Features
Captivate 9 Features
 
Adobe Premiere Pro How to Use Drop Shadow Effect.pptx
Adobe Premiere Pro How to Use Drop Shadow Effect.pptxAdobe Premiere Pro How to Use Drop Shadow Effect.pptx
Adobe Premiere Pro How to Use Drop Shadow Effect.pptx
 
On the tomcat drive in folder cosc210 you will find file named Paint.docx
On the tomcat drive in folder cosc210 you will find file named Paint.docxOn the tomcat drive in folder cosc210 you will find file named Paint.docx
On the tomcat drive in folder cosc210 you will find file named Paint.docx
 
Manual Layout Revisited
Manual Layout RevisitedManual Layout Revisited
Manual Layout Revisited
 
Wilcom students
Wilcom studentsWilcom students
Wilcom students
 
Inkscape - A brief
Inkscape - A briefInkscape - A brief
Inkscape - A brief
 
Work in progress
Work in progressWork in progress
Work in progress
 

Más de allenbailey

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing codeallenbailey
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aidsallenbailey
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivityallenbailey
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math objectallenbailey
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arraysallenbailey
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and outputallenbailey
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operationsallenbailey
 

Más de allenbailey (7)

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing code
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aids
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivity
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math object
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arrays
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and output
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operations
 

Último

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

2.3 exploring shapes

  • 1. Microsoft® Small Basic Exploring Shapes Estimated time to complete this lesson: 1 hour
  • 2. Exploring Shapes In this lesson, you will learn about: Creating shapes by using the Shapes object. Using various operations of the Shapes object. Animating shapes on the screen.
  • 3. Introduction to the Shapes Object So far, you have learned to use the GraphicsWindow and the Turtle objects to draw patterns in Small Basic. This lesson introduces you to the Shapes object offered by Small Basic! You can use the Shapes object to add, rotate, and animate the shapes in the graphics window. You can color your shapes by using specific properties of the GraphicsWindow object.
  • 4.
  • 10. Move
  • 12.
  • 13. Operations of the Shapes Object Now let’s understand these operations in detail… HideShape—This operation allows you to hide a shape displayed on the graphics window. ShowShape—This operation allows you to display a shape on the graphics window. AddRectangle—Using this operation, you can draw a rectangle on the graphics window. SetOpacity—You can set the opacity of a shape by using the SetOpacity operation. You must specify the name of the shape and an opacity level from 0 to 100. GetOpacity—This operation gets the opacity of a shape. You must specify the name of the shape as a parameter to this operation.
  • 14. Operations of the Shapes Object Let’s look at another example to demonstrate some more operations… In this example, we have used the AddImageoperation to insert an image on the screen. Next, we have used the Move, Animate and Zoom operations to perform various actions on the image.
  • 15. Operations of the Shapes Object Move—Using this operation, you can set the new location of the shape on the graphics window. You must specify the name of the shape, and the x- and y-coordinates of the new location. Animate—This operation animates a shape to a new position. You must specify the name of the shape, the x- and y-coordinates of the new position, and the duration of the animation. AddImage—Using this operation, you can insert an image on the graphics window. Zoom—The Zoom operation scales a shape by using a particular zoom level. You must specify the name of the shape and select a zoom level between 0.1 and 20.
  • 16. Operations of the Shape Object You can use the Shapes object to add different types of shapes in your program. You can then perform various operations on the Shapes object, such as moving the shape, setting its opacity, or adding a zoom effect. Now, let’s look at an example… Click the button on the toolbar.
  • 17. Animating a Shape Let’s see an example to animate a shape by using the Shapes object. In this example, you animate a shape from its original position to a new position and back to its original position on the graphics window.
  • 18. Rotating a Shape Let’s explore some more operations of the Shapes object by writing a program to rotate a shape. output When you execute the program, the rectangle rotates on the graphics window. Click the button on the toolbar. In this example, you use a For loop to rotate a shape along its original position on the graphics window.
  • 19. Fun with Shapes In addition to drawing shapes of different styles and sizes, you can also create unique shape designs by using conditions and loops in your program. For example, you can use a For loop to create multiple rectangles in random colors… output
  • 20. Let’s Summarize… Congratulations! Now you know how to: Create shapes by using the Shapes object. Use various operations of the Shapes object. Animate the shapes on the screen.
  • 21.
  • 22. Set the color, size, and location for the shapes as required.
  • 23. Animate the circle so that it moves from the left side of the graphics window to the right, on top of the line.

Notas del editor

  1. You can create shapes on the screen by using the Shapes object. Take a look at the example on the screen:First, you use the PenWidth, PenColor, and BrushColor properties of the GraphicsWindow object to set the color and width of the pen, and the color of the brush that you use to draw the shapes.In this example, you want to draw two rectangles of the same size, so you use the AddRectangle operation of the Shapes object, and define the parameters for the width and height of the rectangle. You set the location of the rectangles on the graphics window; use the Move operation and define the parameters for the x-coordinate and y-coordinate to where you want the rectangle to move.To set an opacity level for a rectangle, you use the SetOpacity operation with parameters that include the name of the shape and the opacity level.Next, you can zoom a rectangle, by using the Zoom operation. Simply specify the parameters for the name of the shape, and the zoom level on the x-axis and y-axis, respectively. Check the output of your program by clicking the Run button on the toolbar or pressing F5 on the keyboard. Notice the difference between the two rectangles after using operations of the Shapes object on one of the rectangles.Code:GraphicsWindow.Title = "Exploring Shapes"GraphicsWindow.Height = 350GraphicsWindow.Width = 450GraphicsWindow.PenWidth = 2GraphicsWindow.PenColor = "Black"GraphicsWindow.BrushColor = "Purple"rectangle1 = Shapes.AddRectangle(100, 100)Shapes.Move(rectangle1, 50, 80)rectangle2 = Shapes.AddRectangle(100, 100)Shapes.Move(rectangle2, 300, 80) For i = 1 To 4Program.Delay(1000) Shapes.Zoom(rectangle1, i * 0.4, i * 0.4) Shapes.SetOpacity(rectangle1,i * 5)EndFor
  2. In addition to drawing shapes of different styles and sizes, you can also create unique shape designs by using conditions and loops in your program. For example, look at the displayed code. You use a For loop to create multiple rectangles, positioned in ascending order by size. You also use the GetRandomColoroperation of the GraphicsWindow object to randomize the color of the rectangles. When you click the Run button on the toolbar or press F5 on the keyboard, the program executes, demonstrating a colorful display of rectangles.Code:GraphicsWindow.Title = "Exploring Shapes"GraphicsWindow.Height = 500GraphicsWindow.Width = 700For i = 0 To 20GraphicsWindow.PenWidth = 0.5GraphicsWindow.BrushColor = GraphicsWindow.GetRandomColor() rectangle1 = Shapes.AddRectangle(i * 20, i * 10)Shapes.Move(rectangle1, i * 10, i * 10)EndFor
  3. Solution: GraphicsWindow.Title = "Exploring Shapes"GraphicsWindow.Height = 200GraphicsWindow.Width = 300 GraphicsWindow.PenColor = "Purple"base = Shapes.AddLine(0, 0, 300, 0)Shapes.Move(base, 0, 100)GraphicsWindow.PenColor = "Black"GraphicsWindow.BrushColor = "Cyan"circle = Shapes.AddEllipse(50, 50)Shapes.Move(circle, 0, 50)Shapes.Animate(circle, 250, 50, 1000)